top of page

Working With Date / Time Formats

In this post we look at the Standard Formats available for formatting Date/Time values as well as Custom Formats that are available. The main areas we see Date/Time formats used are the Data Grids, Finished Reports, and Visualize.


Standard Format Strings for Date/Time Values

The Standard date / time format strings contain a single character. This character defines the pattern used to display the value (if and how to display the year, month, etc.).

Format Specifier Description Sample Output (2/22/2023)

d Short date 2/22/2023

D Long date Wednesday, February 22, 2023

t Short time 12:00 AM

T Long time 12:00:00 AM

f Full date/time Wednesday, February 22, 2023 12:00 AM

F Full date/time Wednesday, February 22, 2023 12:00:00 AM

g General date/time 2/22/2023 12:00 AM

G General date/time 2/22/2023 12:00:00 AM


Custom Format Strings for Date/Time Values

To create format patterns for date and time values, combine the strings listed in the tables below. These strings represent the year, month, day, hours, minutes, seconds, etc. in different formats.

The following table lists the most frequently used strings that can be used to format dates.

Format Specifier Description Sample Output (2/22/2023)

yy The last two digits of the year. 23

yyyy A four-digit year. 2023

MM The number of the month. 02

MMM A short text description of the month. Feb

MMMM The full name of the month. February

dd Day of the week (number) 22

ddd Day of the week (short name) Wed

dddd Day of the week (full name) Wednesday

/ Date separator Wednesday / February / 22

Example Custom Date Formats:

dd--MM--yy : 22--02--23

dd-/-MM-/-yy : 23-/-02-/-23

MM / yyyy / dddd : 02 / 2023 / Wednesday



The next table lists strings that are used to format time values.

Format Specifier Description

hh Hours

mm Minutes

ss Seconds

tt If present, represents data in AM/PM format

: Time separator

8 views0 comments

Recent Posts

See All

ความคิดเห็น


bottom of page