Number of days between dates from different program stages

Hi All,

I would like to know if it is possible to calculate number of days between dates in different program stages.

Thanks

Hi there!
Yes you can. Have a look at the reference table and see the d2:xxxBetween date functions:

These functions accepts a syntax that references the (latest) event date for a program stage in an enrollment:
PS_EVENTDATE:(programStageUid)
In your example:
d2:daysBetween(PS_EVENTDATE:(admisstionProgramStageUid), PS_EVENTDATE:(dischargeProgramStageUid))

Markus

2 Likes