Date Formatting

Use date formatting to convert the Date object to a human readable string. Several methods support standard and custom date formats.

  • kendo.format
  • kendo.toString

Standard Date Formats

Format
Pattern
Example
Result
d
Short date ("M/d/yyyy" for en-US)
kendo.toString(new Date(2000, 10, 6), "d")
11/6/2000
D
Long date (dddd, MMMM dd, yyyy" for en-US)
kendo.toString(new Date(2000, 10, 6), "D")
Monday, November 06, 2000
F
Full date/time ("dddd, MMMM dd, yyyy h:mm:ss tt" for en-US)
kendo.toString(new Date(2000, 10, 6), "D")
Monday, November 06, 2000 12:00:00 AM
g
General date/time (short time) (M/d/yyyy h:mm tt" for en-US)
kendo.toString(new Date(2000, 10, 6), "g")
11/6/2000 12:00 AM
G
General date/time (long time) (M/d/yyyy h:mm:ss tt" for en-US)
kendo.toString(new Date(2000, 10, 6), "G")
11/6/2000 12:00:00 AM
M/m
Month/day ("MMMM dd" for en-US)
kendo.toString(new Date(2000, 10, 6), "m")
November 06
u
Universal sortable date/time ("yyyy'-'MM'-'dd HH':'mm':'ss'Z" for en-US)
kendo.toString(new Date(2000, 10, 6), "u")
2000-11-06 00:00:00Z
Y/y
Year/month ("MMMM, yyyy" for en-US)
kendo.toString(new Date(2000, 10, 6), "y")
November, 2000

Custom Date Formats

FormatDescriptionRange/Example
dDay of the month.1-31
ddDay of the month.01-31
dddAbbreviated weekday name.Sun, Mon, Tue
ddddFull weekday name.Wednesday, Thursday, Friday, Saturday
fTenths of seconds in a date and time value.12:00:10
ffHundredths of seconds in a date and time value.12:00:01
fffMilliseconds in a date and time value.12:00:001
MMonth1-12
MMMonth01-12
MMMAbbreviated month name.Jan, Feb, Mar, Apr
MMMMFull month nameMay, June, July, August
hHour in 12-hour clock format.1-12
hhHour in 12-hour clock format.01-12
HHour in 24-hour clock format.1-23
HHHour in 24-hour clock format.01-23
mMinutes0-59
mmMinutes00-59
sSeconds0-59
ssSeconds00-59
ttAM/PM designation-