79532391

Date: 2025-03-24 23:44:18
Score: 2
Natty:
Report link

Using @CALCDATE() with datediff() and min() or max() is the way to go, as per @Louis Martin's answer.

Here's an example I did a while back, if you want to have a play: https://redcap.mcri.edu.au/surveys/?s=MXCETWDFD4. It's easy to extend to however many dates you need to handle.

E.g., for the min of 5 dates d1 to d5:

@CALCDATE(
    [d1],
    min(
        0,
        datediff([d1],[d2],"d",true),
        datediff([d1],[d3],"d",true),
        datediff([d1],[d4],"d",true),
        datediff([d1],[d5],"d",true)
    )
    ,"d"
)

enter image description here

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • User mentioned (1): @Louis
  • Low reputation (0.5):
Posted by: Luke Stevens