Date/Time format strings control the conversion of strings into date-time type.

Date Time Format Strings are composed of specifies that describe values to be converted into the date-time value.

In the following table, specifies are given in the lower case. The case is ignored in formats, except for the "am/pm" and "a/p" specifies.

Specifier          Description

d                      Day as a number without a leading zero (1-31).

dd                    Day as a number with a leading zero (01-31).

m                     Month as a number without a leading zero (1-12).

mm                  Month as a number with a leading zero (01-12).

mmm              Month as an abbreviation (Jan-Dec).

mmmm           Month as a full name (January-December).

yy                    Year as a two-digit number (00-99).

yyyy                Year as a four-digit number (0000-9999).

h                      Hour without a leading zero (0-23).

hh                    Hour with a leading zero (00-23).

n                      Minute without a leading zero (0-59).

nn                    Minute with a leading zero (00-59).

s                       Second without a leading zero (0-59).

ss                     Second with a leading zero (00-59).

zzz                   Fraction of Second with a leading zero (000-999).
                        (Works only for Oracle timestamp fields)

tt                      Uses the 12-hour clock for the preceding h or hh specifier,  'am' for any hour before noon, and 'pm' for any hour afternoon.

Direct link, no registration required.