---
title: "DATETOLOCAL"
url: "https://help.formsfly.com/en/article/datetolocal"
language: "en"
last_updated: "2024-11-01T15:41:33.400Z"
---

# DATETOLOCAL

Converts the given UTC date time value to local date time.

* * *

### Syntax

`**DATETOLOCAL(utcdateval)**`

### Example

```plaintext
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:

1.  Use separate `Date only` and `Time 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**`
2.  Use a single Date & Time field, but also `add a Hidden field` that stores the local date & time equivalent value.  
    This is done by using `**DATETOLOCAL**``()`  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()**](https://help.formsfly.com/en/article/datediff) - then you need to convert the Hidden field back into a Date & Time value via the [**DATE()**](https://help.formsfly.com/en/article/date) formula function.

### Related 

[DATETOUTC](https://help.formsfly.com/en/article/datetoutc)
