You can use a dynamic variable to automatically calculate the time difference between two dates.
For example, you could calculate the age at the time of inclusion (Age at inclusion).
Follow these steps to set it up:
Step 1: Create a Numeric variable
The variable must be of numeric type to perform date calculations.
Step 2: Access the Formula Editor
- Click on "Edit Formula" at the top right.
- When asked "Which kind of dynamics?", select "DateDiff (Delay between two dates)".
Step 3: Set the Date Difference Calculation
- Under "Delay From", select the first date (eg. "Birth date").
- Under "To", select the second date (eg. "Inclusion date").
- Under "Expressed in", choose the unit for the time difference: days, months or years
Step 4: Activate the Dynamic Calculation
- Click the orange message at the top right: "Activate My Dynamics".
- Check "I understand", then choose: Retrospective Mode (Applies the calculation to all patients in the study) ± Safe Mode (Also applies to all patients but does not overwrite manually entered values. If the delay was previously calculated and entered manually, it will be preserved).
- Click "Activate My Dynamics" to finalize.
Your dynamic date calculation is now active! You can verify the results in patient records.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article