Date/Time Display

The Date/Time Display item is used to display the current Date and Time to the operator. This can be configured to display using a custom format.

To add a Date/Time Display to your Display Layout, drag and drop it from the Toolbox into the work area. Configure the Date / Time Format in the Properties grid. You can either select a preset format, or enter a custom one using the format specifiers below.

Table 1. Shortcut Format Specifiers
Specifier Description Example Format Example Output
d When d is used alone it outputs a short date. d 6/5/2009
D When D is used alone it outputs a long date. D Monday, June 5, 2009
f When f is used alone a full short date/time is shown. f Monday, June 5, 2009 1:05
F When F is used alone a full long date/time is shown. F Monday, June 5, 2009, 1:05:08
g When g is used alone a general short date/time is shown. g 6/5/2009 1:05
G When G is used alone a general long date/time is shown. G 6/5/2009 1:05:08
M, m When either M or m is used alone a month/day is shown. M June 5
O, o When either O or o is used alone a round-trip date/time is shown. O 2009-06-05T13:05:08.0000000-07:00
R, r When R or r is used alone an RFC1123 is shown. This does not convert the current time. R Mon, 5 Jun 2009 13:05:08 GMT
s When s is used alone a sortable date/time is shown. s 2009-06-05T13:05:08
t When t is used alone a short time is shown. t 1:05
T When T is used alone a long time is shown. T 1:05:08
u When u is used alone a universal sortable date/time is shown. This does not convert the current time. u 2009-06-05 13:05:08Z
U When U is used alone a full universal date/time is shown. U Monday, June 5, 2009 1:05:08
Y, y When Y or y is used alone a year/month is shown. Y June, 2009
Any other single character When a single character that is not listed above is used, the format will default to the last valid format entered. z Your last format
Table 2. Format Specifiers
Specifier Description Example Format Example Output
h An hour in a 12-hour format with no leading zeros. h:m 1:05
hh An hour in a 12-hour format with a leading zero. hh:mm 01:05
H An hour in a 24-hour format with no leading zeros. H 13
HH An hour in a 24-hour format with a leading zero. HH 13
m A minute with no leading zeros. h:m 1:5
mm A minute with a leading zero. hh:mm 01:05
s A second with no leading zero. hh:mm:s 01:05:8
ss A second with a leading zero. hh:mm:ss 01:05:08
tt Represents AM/PM. hh:mm:ss tt 01:05:08 PM
y The year with no leading zeros in a short format. y 9
yy The year with a leading zero in a short format. yy 09
yyyy The year in a long format. yyyy 2009
M The month with no leading zero. M-yyyy 6-2009
MM The month with a leading zero. MM-yyyy 06-2009
MMM The shorthand string for the month. MMM yyyy Jun 2009
MMMM The full-length string for the month. MMMM yyyy June 2009
d The day with no leading zero. yyyy-MM-d 2009-06-5
dd The day with a leading zero. yyyy-MM-dd 2009-06-05
ddd The shorthand string for the day of the week. ddd, MMMM d yyyy Mon, June 5 2009
dddd The full-length string for the day of the week. dddd, MMMM d yyyy Monday, June 5 2009
Tip:

Surrounding a portion of the format in single quotations ('') will stop formatting for that portion of the string.

Example: 'Year' yyyy > Year 2009

Tip:

Placing a backslash (\) before a format specifier will escape the formatting.

Example: \y:y > y:09