Date + 1 day in Web Form

793
1
Jump to solution
04-11-2020 08:18 AM
DanielKonzek
Occasional Contributor

Ismael ChiviteJames Tedrick

I am having difficulties with a calculation that would simply add 1 day to the date question collected in Survey123.  The form is a web form, so I am converting the date to decimal-date-time and then attempting to add 1.00000008 (1 day in DDT).  This works perfectly in Survey123 Connect, and it seems to work when I submit data in my webform.  It does not work however when anyone outside of my time zone submits data.  I have attempted to pull UTC offset and calculate the date with a UTC offset and then add one day, but I cannot get that calculation to work properly.  Any thoughts on how I could get this to work properly for multiple time zones?

Here is a screen capture showing some of my various attempts:

Thank you,


Dan

0 Kudos
1 Solution

Accepted Solutions
DanielKonzek
Occasional Contributor

Just in case anyone else runs into this, the issue was that I was using "date(decimal-date-time..." and should have been using "date-time(decimal-date-time) to convert the collected date fields into the proper decimal-date-time format as required when using web forms.  

View solution in original post

0 Kudos
1 Reply
DanielKonzek
Occasional Contributor

Just in case anyone else runs into this, the issue was that I was using "date(decimal-date-time..." and should have been using "date-time(decimal-date-time) to convert the collected date fields into the proper decimal-date-time format as required when using web forms.  

0 Kudos