Select to view content in your preferred language

Calculate dates Survey123 Connect

159
1
04-01-2025 01:42 PM
SIG-EscutismoCNE
Emerging Contributor

Hello,

 

Can anyone help me?

I have a field called "data_de_in_cio_da_actividade" (default: format-date(${wsdatetime},'%H:%M') and another one called "inserir_data_de_submiss_o" (default: now())

I need to receive a message when the field "inserir_data_de_submiss_o" is less than 14 days from the field "data_de_in_cio_da_actividade"

Already tried this expression but without success

date(${data_de_in_cio_da_activity}) - date(${inser_data_de_submiss_o}) < 14

 

Thanks for your attention,

0 Kudos
1 Reply
DavidSolari
MVP Regular Contributor

Calculations between two dates either work using "epoch time" in microseconds or "decimal time" which are whole days with hours, minutes etc. stored in the decimal. This part of the docs explains how to convert between the two and provides examples for doing calculations in both styles.

0 Kudos