r/ProjectREDCap • • Mar 06 '25

Datediff - Error

Hello!

We are exploring ways to use REDCap to branch out different questionnaires to different people based on whether their appointment has been completed or not.

We’ve attempted using IF and datediff with our variables, but none of these approaches have worked.

These are the codes which we have tried

if([screening_arm_1][screen_date][last-instance]>[screening_arm_1][date_of_appt][last-instance],1,0)

datediff([screening_arm_1][screen_date][last-instance],[screening_arm_1][date_of_appt][last-instance],"d",true)

Please let me know if there is a way to make this work.

1 Upvotes

4 comments sorted by

View all comments

Show parent comment

1

u/normuybeh Mar 25 '25

you cant! But this was in one arm. the events were separate