Custom Formatting Dates and Time
Custom Formatting Dates and Time
formatting
dates
and time
# 5acXjzUk
Date format
Example
Code Description
January 1, 2025
m Month number without leading zero 1
mm Month number with leading zero 01
mmm Month name, abbreviated form Jan
mmmm Name of the month, full form January
mmmmm Month as the first letter J
d Day number without leading zero 1
dd Day number with leading zero 01
ddd Day of the week, short form Wed
dddd Day of the week, full form Wednesday
yy Year (last 2 numbers) 25
yyyy Year (4 numbers) 2025
Time format
Code Description Example
09:09:09
h Hours without a leading zero 9
hh Hours with leading zero 09
m Minutes without leading zero 09:9
mm Minutes with leading zero 09:09
s Seconds without a leading zero 09:09:9
ss Seconds with leading zero 09:09:09
Day periods (if omitted, 24-hour format
AM/PM AM or PM
is used)
When creating a custom date format in Excel, you can use comma (,),
hyphen (-), slash (/), colon (:) and other characters, and you can
combine formats in different ways
# 5acXjzUk
Date format for another location
If you want to display dates in a different language, you'll need to create
a custom format and add a date prefix with the appropriate locale code.
The locale code should be enclosed in [square brackets] and preceded
by a dollar sign ($) and a hyphen (-).
Here are some examples:
A full list of codes can be found on the Internet by entering the password
Windows Locale Codes
# 5acXjzUk