Date and Time Formats

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

For information on how to set the default date and time 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/2012

%m/%d/%y

mm/dd/yy

02/21/12

%d/%m/%Y

dd/mm/yyyy

21/02/2012

%d/%m/%y

dd/mm/yy

21/02/12

%d-%m-%Y

dd-mm-yyyy

21-02-2012

%d-%m-%y

dd-mm-yy

21-02-12

%m-%d-%Y

mm-dd-yyyy

02-21-2012

%m-%d-%y

mm-dd-yy

02-21-12

%Y-%m-%d

yyyy-mm-dd

2012-02-21

%f/%e/%Y

m/d/yyyy

2/21/2012

%f/%e/%y

m/d/yy

2/21/12

%e/%f/%Y

d/m/yyyy

21/2/2012

%e/%f/%y

d/m/yy

21/2/12

%f-%e-%Y

m-d-yyyy

2-21-2012

%f-%e-%y

m-d-yy

2-21-12

%e-%f-%Y

d-m-yyyy

21-2-2012

%e-%f-%y

d-m-yy

21-2-12

%b %e, %Y

Mth d, yyyy

Feb 21, 2012

%B %e, %Y

Month d, yyyy

February 21, 2012

%b %d, %Y

Mth d, yyyy

Feb 21, 2012

%B %d, %Y

Month d, yyyy

February 21, 2012

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

yyyy-mm-dd hh:mm:ss

2012-02-21 12:00:00

H:%M:%S

hh:mm:ss

12:00:00

You can type a date or time format in the text portion of the list if the format of the 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 appears. Exclude the day, month, year, hour, minutes, and 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 2012. Date strings are not case sensitive. For example, you can specify %B for dates that contain strings like February, FEBRUARY, or FEBruary.