You are here:
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.
-
In Minimum Time, enter the earliest time the user can
select, such as 12:00 am.
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.
-
In Maximum Time, enter the latest time the user can select, such as 08:00 pm.
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.
-
In Time Display Format, enter the format to display the
time, such as hh:mm a, which is the default.
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 displays3:30 pm, and hh:mm:ss. displays15:30 01. For more format options, see Day.js. - 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.
-
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.
-
- For additional properties, see Common Omniscript Element Properties.

