---
schema_version: "1"
id: debd0bd3b4f95aabc201fc9b2fd20c79d41455cbf7df1d97b420e7e2f01c58c6
title: Omniscripts Time Element
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_omniscripts_time_element_17378.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_omniscripts_time_element_17378.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: f0f582603c2fe3ca8959bc756b2f79fc7ec6e394bf8c92f29f3a08ff876399de
description: Enable users to select from a list of times by adding the Time element to your Omniscript. Format the display and set the time intervals.
products:
  - Omnistudio
release: "264"
---
# Omniscripts Time Element

Enable users to select from a list of times by adding the Time element to your Omniscript. Format the display and set the time intervals.

1. In **Minimum Time**, enter the earliest time the user can select, such as 12:00 am.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/images/icon_note.png)
    
    Note
    
    The format entered must be the same as in the **Time Display Format** field. For example, to set the minimum time to midnight, if the **Time Display Format** is hh:mm a, you must enter 12:00 am.
2. In **Maximum Time**, enter the latest time the user can select, such as 08:00 pm.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/images/icon_note.png)
    
    Note
    
    The format entered must be the same as in the **Time Display Format** field. For example, to set the maximum time to 8pm, if the **Time Display Format** is hh:mm a, you must enter 08:00 pm.
3. In **Time Display Format**, enter the format to display the time, such as hh:mm a, which is the default.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/images/icon_note.png)
    
    Note
    
    Enter h or hh for hour, m or mm for minute, s or ss for seconds, and a for am/pm. A single letter, such as h or m, has no leading zero. Remove the a to display 24 hour time. For example, hh:mm a displays `03:30 pm`, h:mm a displays `3:30 pm`, and hh:mm:ss. displays `15:30 01`. For more format options, see [Day.js](https://day.js.org/docs/en/parse/string-format).
4. In **Time Interval**, enter the intervals within an hour the user can select from the time dropdown. For example, enter 15 for 15 minute periods within the hour such as 12:00, 12:15, 12:30, 12:45, and so on. The default interval is 30.
5. In the **Advanced Options** section, update values for these properties:
    
    - **Data Type**: Specifies how to display the time in the Data JSON.
        
        - If set to **String**, the specified format is applied. **String** is the default data type.
        - If set to **Date**, the time is encoded as an ISO 8601 time.
    - **Format**: Specifies how the time is formatted in the Data JSON when **Data Type** is set to **String**. The default format is HH:mm:ss.sss'Z', and 'Z' refers to the GMT timezone. If you choose the data type as **Date**, after you save the time in your Omniscript, and when you retrieve the time later, it shows your current timezone instead of GMT. For example, if you add 3:00 PM GMT in a time field, and you're in the IST timezone, when you retrieve the time in Omniscript, it shows the time as 8:30 PM IST. Therefore, to retrieve the time with the correct timezone, we recommend that you convert the retrieved time to GMT. If you choose the data type as **String**, you can enter the date in the HH:mm:ss.sss'Z' format, and you don't have to convert when you retrieve the time.
        
        In the designer for a managed package, the field is **Model Time Format**. For more format options, see [Day.js](https://day.js.org/docs/en/parse/string-format).
6. For additional properties, see [Common Omniscript Element Properties](https://help.salesforce.com/s/articleView?id=xcloud.os_common_omniscript_element_properties_definitions__10687.htm&release=264.0.0&type=5 "Each Omniscript element has settings, some of which are unique to that element. Some settings are common among the elements, though some of these setting aren’t available in all elements. To edit these settings, use the Properties pane on the Designer.").