Custom
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:
Example: 05.12.2024 format [$-000] dddd mmmm yyyy
[$-407] - German Donnerstag Dezember 2024
[$-804] - Chinese 星期四 十二月 2024
[$-439] - Hindi गरु
ु वार दिसम्बर 2024
A full list of codes can be found on the Internet by entering the password
Windows Locale Codes
Time format over 24 hours
When adding time, the total can exceed 24 hours. To format the time
over 24 hours correctly, enclose the time code in square brackets, e.g.
[g]
Format Example 41:30 displays
[h]:mm 41:30
[m] 2490
[h] "hours", mm "min" 41 hours, 30 min
d h:mm:ss 1 17:30:00
d "day" h:mm:ss 1 day 17:30:00
d "day", h "hours and" m "min" 1 day, 17 hours and 30 min
# 5acXjzUk