Skip to main content


 

Symptoms


Calendar control selecting wrong date (always 1 day earlier)
 

Diagnoses


DateTime values are stored in the server's time zone. When bringing the value into a SmartForm and using it in a function or control, the date is automatically converted to the local user's time zone via client-side JavaScript.
 

Resolution

As for a workaround, assuming that you want to show the date without the time, as recorded in the server's time zone, add an Expression that takes in the original DateTime and truncates the time component. This can be added directly to a calendar control, and looks like the following:

Left( datetime, 10 )

This will return 10 characters from the left side, assuming the standard SmartForm-converted DateTime format of 'YYYY-MM-DD HH:MM:SSZ', which will not be converted by the Calendar control.




 
Be the first to reply!

Reply