DATETOLOCAL
Converts the given UTC date time value to local date time.
Syntax
DATETOLOCAL(utcdateval)
Example
DATETOLOCAL({{mydatefield}}
Notes
When used in a Form Design the local time is based on the device's local time. If used in a template, local time is based on the Organisation's Default time zone.
How to get Date & Time values stored in your local timezone
If you want to have a Form which needs to capture a date & time value in your local timezone, then you should either:
- Use separate
Date only
andTime only
fields instead of one Date & Time field.
Remember with Date/Time only fields, the values are stored in device local timezone.
You can always then combine these values as desired when utilising these answers in templates or connectors.OR
- Use a single Date & Time field, but also
add a Hidden field
that stores the local date & time equivalent value.
This is done by usingDATETOLOCAL
()
in the Hidden field's Dynamic Value property.
Remember that Hidden fields store values in textual format, so if you want to use this Hidden field in a date formula - e.g. DATEDIFF() - then you need to convert the Hidden field back into a Date & Time value via the DATE() formula function.