Set a .NET DateTime format
- Last UpdatedSep 19, 2024
- 1 minute read
You can set the .NET DateTime format in which the Alarm Control shows the alarm and event records. You can either use a predefined DateTime format, or compose one. The predefined date format is based on the short date format setting of the operating system and may vary from computer to computer.
To set the .NET DateTime format
-
Double-click the Alarm Control on the canvas. The Edit Animations dialog box appears.
-
Click Time Settings. The Time Settings page appears.
-
In the Time Format area, do the following:
-
Select the Use .NET Time Format check box.
-
Select date format codes from the list at the right. The equivalent date format code appears in the box above.
-
Select time format codes from the list at the right. The equivalent time format code is appended to the time format string.
-
-
If you want to customize the DateTime format, modify the codes in the box as in the table below. For more information, see the Microsoft Knowledge database on .NET DateTime formats.
Code
Purpose
Example
M
Single-digit month
9
MM
Two-digit month
09
MMM
Three-letter month
Sep
MMMM
Full month name
September
d
Single-digit day
8
dd
Two-digit day
08
ddd
Abbreviated day of the week
Mon.
dddd
Day of the week
Monday
yyyy
Four-digit year
2008
yy
Two-digit year
08
HH
Hours in 24 hour format
14
hh
Hours in 12 hour format
2
mm
Minutes
55
ss
Seconds
34
fff
Milliseconds
223
tt
AM or PM
PM
-
Click OK.