You are on page 1of 1

Excel Custom Date & Time Formatting

When formatting a cell as a date, time or date and time, use the following
characters:
d
- Day of the month or day of week
d = one or two digit representation (eg. 1, 12)
dd = 2 digit representation (eg. 01, 12)
ddd = abbreviated day of week (eg. Mon, Tue)
dddd = full name of day of week (eg. Monday, Tuesday)
m
- Month (when used as part of a date)
m = one or two digit representation (eg. 1, 12)
mm = two digit representation (eg. 01, 12)
mmm = abbreviated month name (eg. Jan, Dec)
mmmm = full name of month (eg. January, December)
y

- Year
yy = 2-digit representation of year(eg. 99, 08)
yyyy = 4-digit representation of year(eg. 1999, 2008)

AM/P
M

- Hour
h = one or two digit representation (eg. 1, 20)
hh = two digit representation (eg. 01, 20)
- Minute (when used as a part of a time)
m = one or two digit representation (eg. 1, 55)
mm = two digit representation (eg. 01, 55)
- Second
s = one or two digit representation (eg. 1, 45)
ss = two digit representation (eg. 01, 45)
- Indicates that a time should be represented using a 12-hour
clock, followed by "AM" or "PM"

Date & Time Formatting Examples


The example below shows different Excel formatting definitions for the date and
time '06:00AM on 25th August 2008':

Formatting Definition:
dd/mm/yy
d/m/yyyy
ddd dd mmmm yy
dd/mm/yyyy hh:mm:ss
hh:mm:ss
dddd dd mmm yyyy hh:mm:ss AM/PM

Resulting Format of Date / Time


25/08/08
25/8/2008
Mon 25 August 08
25/08/2008 06:00:00
06:00:00
Monday 25 Aug 2008 06:00:00 AM

You might also like