Date and Time Formats

The following table lists the default date and time format specifiers that are provided by Content Manager OnDemand.

For information on how to set the default date format for fields in folders and applications that use the Date data type, see Manage Date Formats.

Format Specifier Format Example

%m/%d/%Y

mm/dd/yyyy

02/21/2018

%m/%d/%y

mm/dd/yy

02/21/18

%d/%m/%Y

dd/mm/yyyy

21/02/2018

%d/%m/%y

dd/mm/yy

21/02/18

%d-%m-%Y

dd-mm-yyyy

21-02-2018

%d-%m-%y

dd-mm-yy

21-02-18

%m-%d-%Y

mm-dd-yyyy

02-21-2018

%m-%d-%y

mm-dd-yy

02-21-18

%Y-%m-%d

yyyy-mm-dd

2018-02-21

%f/%e/%Y

m/d/yyyy

2/21/2018

%f/%e/%y

m/d/yy

2/21/18

%e/%f/%Y

d/m/yyyy

21/2/2018

%e/%f/%y

d/m/yy

21/2/18

%f-%e-%Y

m-d-yyyy

2-21-2018

%f-%e-%y

m-d-yy

2-21-18

%e-%f-%Y

d-m-yyyy

21-2-2018

%e-%f-%y

d-m-yy

21-2-18

%b %e, %Y

Mth d, yyyy

Feb 21, 2018

%B %e, %Y

Month d, yyyy

February 21, 2018

%b %d, %Y

Mth d, yyyy

Feb 21, 2018

%B %d, %Y

Month d, yyyy

February 21, 2018

%Y-%m-%d %H:%M:%S

yyyy-mm-dd hh:mm:ss

2018-02-21 12:00:00

%H:%M:%S

hh:mm:ss

12:00:00

%Y-%m-%d %I:%M:%S %p

yyyy-mm-dd HH:MM:SS tt

2018-10-29 10:02:48 AM

%Y-%m-%d %I:%M:%S %p

yyyy-mm-dd HH:MM:SS tt

2018-10-29 07:30:20 PM

You can create a customized format specifier in the text portion of the list if the format of the date or date/time that you require is not one of the standard formats that are listed. Use a format specifier to describe the format of the date or time that you require. A format specifier consists of a set of values, such as %m, and separators, such as the / character. Specify the order in which the day, month, year, hour, minutes, and seconds appear. Exclude the day, month, year, hour, minutes, or seconds, if that part of the date or time does not appear in the format. Add value separators where required. For example, %d %B %Y represents dates that appear in the format of 21 February 2018. As another example, %b %e %Y represents dates that appear in the format of Feb 5 2018. Date strings are not case sensitive. For example, you can specify %B for dates that contain strings like February, FEBRUARY, or FEBruary.

When creating a customized format specifier, there must be one or more separator characters between numbers in a date. For example, %b %e, %Y represents a date such as Feb 5, 2018. The separator characters between the day of the month (5) and the year (2018) are a comma and a space. Specifying %b%e%Y for a date such as Feb52018 is not valid. However, the name of the month or the three-character abbreviation for the name of the month can be used as the separator between the day of the month and year. For example, %e%b%Y represents dates that appear in the format of 5Feb2018.

The %e and %d can be used for one or two digit days. When a format specifier contains %e, single digit days are displayed as a single digit. When using %d, single digit days are displayed with a leading zero. For example, %b %e, %Y will display the date Feb 5, 2018 with a single digit for the day of the month. The format specifier %b %d, %Y will display the date Feb 05, 2018 with a leading zero for the day of the month.

The %f and %m can be used for one or two digit months. When a format specifier contains %f, single digit months are displayed as a single digit. When using %m, single digit months are displayed with a leading zero. For example, %f %e %Y will display the date 2 5 2018 with a single digit for the month. The format specifier %m %d %Y will display the date 02 05 2018 with a leading zero for the month.