Hi all, I am new to this software and am still learning, however I am struggling to achieve a calculation using dates.
I am writing patient notes and would like to have a date picker with a calculation of days elapsed eg:
"Onset of illness {date picker} - unwell for {calculation today-date selected} 7 days"
Please can anyone advise how to go about this?
Many thanks
Andy.
Date calculations
To pick a date, use Selection Form macro, Type: DateTime.
To write a calculated date (from today), use Date and Time macro.
To pick a date and then perform the maths on it, you need a script. It depends on the date format you are using in Selection Form macro - let me know and I will try to create it for you.
To write a calculated date (from today), use Date and Time macro.
To pick a date and then perform the maths on it, you need a script. It depends on the date format you are using in Selection Form macro - let me know and I will try to create it for you.
Thanks Tom, that's really generous of you. I use the British date format of dd/mm/yyyy.Tom wrote: ↑Dec 28th, ’23, 18:38 To pick a date, use Selection Form macro, Type: DateTime.
To write a calculated date (from today), use Date and Time macro.
To pick a date and then perform the maths on it, you need a script. It depends on the date format you are using in Selection Form macro - let me know and I will try to create it for you.
Andy.
1. Selection Form macro, Name: MyDate, Type: DateTime, Format: dd/MM/yyyy, No output
2. Insert Command Code macro:
2. Insert Command Code macro:
Code: Select all
StringSplit, COL, SELECT_MyDate, /
Date:=COL3 COL2 COL1
Date += 7, Days
FormatTime, Date, %Date%, dd/MM/yyyy
Send, % Date 