---
title: ToLocal
slug: neurons-for-itsm/admin-user-help/enu/latest/tolocal
createdAt: 2026-07-14T19:16:51.592Z
---

Converts a DateTime value to the local date and time in a time zone.

- If you execute this function with both parameters, it returns the local date and time in the time zone that you specify.
- If you execute this function without the **timeZone** parameter, it returns the local date and time in the time zone associated with the current session.
- If you execute this funtion with no parameters, it returns the current local date and time associated with the current session.

## Syntax

ToLocal(utcDateTime, timeZone)

## Enabled For

For a description of the business object categories, see [Notes on "Enabled For"](docId\:u26v9feCFs6iLwA0-PVJd).

| Business Object Category                                                                    | Yes/No |
| ------------------------------------------------------------------------------------------- | ------ |
| Business Rules: Before-Save Rules                                                           | Yes    |
| Business Rules: Calculation Rules (After Save, with or without Also Recalculate on Load)    | Yes    |
| Business Rules: Calculation Rules (Before Save or Always, without Also Recalculate On Load) | Yes    |
| Business Rules: Calculation Rules (Before Save or Always, with Recalculate On Load)         | Yes    |
| Business Rules: Editing Rules                                                               | Yes1   |
| Business Rules: Initialization Rules                                                        | Yes    |
| Business Rules: Read Only Rules                                                             | No     |
| Business Rules: Required Rules                                                              | Yes1   |
| Business Rules: Validation Rules                                                            | Yes    |
| Client Expressions                                                                          | No     |
| Object Permissions                                                                          | No     |
| Services                                                                                    | Yes    |
| LDAP                                                                                        | Yes    |
| Mobile                                                                                      | Yes    |
| Quick Actions (except Export to Microsoft Excel Quick Action and UI Quick Actions)          | Yes    |
| UI Quick Actions                                                                            | No     |
| Reports                                                                                     | Yes    |
| Search/Dashboard without field references                                                   | Yes    |
| Search/Dashboard with field references                                                      | No     |
| 1. Except when this field appears on a form or is triggered by such a field.                |        |

## Parameters

| Parameter   | Description                                                                                                      |
| ----------- | ---------------------------------------------------------------------------------------------------------------- |
| utcDateTime | (Optional) A UTC DateTime value to convert to the local date and time. The default is the current date and time. |
| timeZone    | (Optional) The time zone, in IANA format.                                                                        |

## Return Value

:::Paragraph{indent="1"}
DateTime value.
:::

:::hint{type="info"}
If the application has to display the return value, it implicitly converts it to text, thereby allowing the display format to change depending on your culture code. See [Available Languages and Cultures](docId\:lvpBgqv5Z08McUzY43kY3) for a list of the culture codes used by Neurons for ITSM.
:::

## Example

$(ToLocal(CurrentDateTime()))

:::Paragraph{indent="1"}
The above example returns the current local date and time. (The **CurrentDateTime()** function returns the current date and time in UTC, and then the **ToLocal()** function converts it to the current local date and time.)
:::

### [:inlineImage[]{src="https://api.archbee.com/api/optimize/parib0MC3hVoUNdfQdnac/_PssGld_o0fIpUcYDPIWo_transparent.gif" alt="Related Topics Link Icon" caption size="10" width="16" height="16"}Related Topics](javascript\:void\(0\);)
