New to Telerik UI for WinUI? Download free 30-day trial

DateTime MaskType

The tables below describe the mask characters that can be used when the MaskType is DateTime. Note that the format characters are case sensitive.

Standard Date Format codes

Full list of the supported masks can be found in the following MSDN article: Standard DateTime masks

Format Character Description
d Short date pattern
D Long date pattern
f Full date and time (long date and short time)
F Full date time pattern (long date and long time)
g General (short date and short time)
G General (short date and long time)
m, M Month day pattern
r, R RFC1123 pattern
s Sortable date time pattern (based on ISO 8601) using local time
t Short time pattern
T Long time pattern

Custom Date Format Codes

Where standard date codes are too restrictive, create your own custom formats using the format patterns listed below.

Full list of the supported masks can be found in the following MSDN article: Custom DateTime masks

Format Pattern Description
dd The numeric day of the month.
ddd The abbreviated name of the day of the week.
M The month name followed by the numeric day.
MM The numeric month.
MMM The abbreviated name of the month.
MMMM The full name of the month.
y The full month name and year numeric.
yy The year without the century.
yyy The year in four digits, including the century.
h The hour in a 12-hour clock.
hh The hour in a 12-hour clock.
H The hour in a 24-hour clock.
HH The hour in a 24-hour clock.
m The minute.
mm The minute.
s The second.
ss The second.
t The first character in the AM/PM designator.
tt The AM/PM designator.

See Also

In this article
Not finding the help you need?