How to calculate date difference such as days between when a record was submitted and now?
Question:
How can I calculate the number of days between the current date in UTC time and the record submission date?
Answer:
Datediff(day,[@field:DateLogged],GetUTCDate())
DateLogged should be replaced with the name of your field where record submission dates are stamped. If you don't have one yet, look here to see how to add one.
To adjust the current date and time to your time zone see the example below which adjusts the time to Pacific which is 8 hours behind UTC.
Datediff(day,[@field:DateLogged],Dateadd(hour,-8,GetUTCDate()))
