Configuring Date Time Field
  • 29 Jan 2023
  • 2 Minutes to read
  • Dark
    Light

Configuring Date Time Field

  • Dark
    Light

Article Summary

Overview

The Date Time Field in Simple Forms allows designers to customize the format of the date and time input field. This allows for a more user-friendly and intuitive display of the date and time information and also helps to ensure that the date and time information entered by the end users is accurate and consistent.

To set a specific date time format, select the Date Time Field control and navigate to the Properties Panel > Control Type > EDIT.
Users can choose the following date and time formats,

  • Date: Allows end users to input only the Date.
  • Date Time: Allows end users to input both the Date and Time.
  • CalendarAllows end users to select a date on a calendar.
  • Time: Allows end users to input only the Time.


Override Date Time Format

To customize the date time format, navigate to the Properties Panel > Setup Data > Override Date Time Format checkbox to True. The Date Format Textbox will now appear to accept the format tokens.

Warning !!!
  • Ensure to use a Date Time control type to use the combination of date and time format.
  • If an invalid token is used, a validation error will be displayed.
Note:
In the latest version of Decisions v8.9, we are removing the support of the following tokens.

Mo, Q, Qo, Do, DDDo, do, e, E, w, wo, ww, W, Wo, WW, N, NN, NNN, NNNN, NNNNN, gg, gggg, GG, GGGG ,A, a, k, kk, z or zz, Z, ZZ, X, x.

The following table describes various Date Time Field format tokens and the outputs that will display to the end user.

Date/Time CounterTokenOutput
MonthM1, 2, ... 11, 12
MM01, 02, ... 11, 12
MMMJan, Feb, ... Nov, Dec
MMMMJanuary, February, ... November, December
Day of MonthD1, 2, ... 30, 31
DD01, 02, ... 20, 31
Day of YearDDD1, 2, ... 364, 365
DDDD001, 002, ... 364, 365
Day of the Weekd0, 1, ... 5, 6
ddSu, Mo, ... Fr, Sa
dddSun, Mon, ... Fri, Sat
ddddSunday, Monday, ... Friday, Saturday


Year
Y1970, 1971, ... 9999, +10000, +10001
Note: This complies with the ISO 8601 standard for dates past the year 9999
YY70,71, ... 29, 30
YYYY1970, 1971, ... 2029, 2030
YYYYYY-001970, -001971, ... +001907, +001971
Note: Expanded Years that cover the full-time value range of approximately 273,790 years forward or backward from January 1st, 1970)
Era Yeary1, 2, ... 2020 ...
HourH0, 1, ... 22, 23
HH00, 01, ... 22, 23
h1, 2, ... 11, 12
hh01, 02, ... 11, 12
Minutem0, 1, ... 58, 59
mm00, 01, ... 58, 59
Seconds0,1, ... 58, 59
ss00, 01, ... 58, 59
Fractional SecondS0, 1, ... 8, 9
SS00, 01, ... 98, 99
SSS000, 001, ... 998, 999
SSSS...SSSSSSSSS000[0..], 001[0..], ... 998[0..], 999[0..]

Example

In the following example, we have formatted the date-time to be MMMM/DD/YYYY HH:mm.

Once the users choose the date and time, this will get converted into the configured format as January/28/2023 15:25


Was this article helpful?