Dates and times are important SCADA attributes that informs the operator when events occurred. You can use custom Date and Time of Day Format patterns to change the way dates and times are displayed.
A custom Date and Time of Day Format consists of a pattern of characters.
These pattern letters are supported in custom date times:
Letter | Description | Example |
---|---|---|
y |
Display the year.
| yy=19 yyyy=2019 |
M |
Display the month of the year (1-12).
| MM=05 MMM=May |
D |
Display the day of the year (1-366). The first day of the year is 1.
The last day of the year is either 365 or
366.
| D=5 DDD=005 |
d |
Display the day of the month (1-31). The first day of the month is 1.
The largest day of the month is
31.
| d=1 DD=01 |
E |
Display the day name.
| E=Mon EEEE=Monday |
u | Display the day of the week number (1-7). 1 = Monday, 2 = Tuesday, ..., 7 = Sunday. | u=1 |
a | Display an AM or PM indicator. | a=AM |
H |
Display the hour of the day (0-23).
| HH=09 |
k |
Display the hour of the day (1-24).
| kk=24 |
K |
Display the hour within AM or PM (0-11).
| KK=09 |
h |
Display the hour within AM or PM (1-12).
| h=09 |
m |
Display the minute of the hour (0-59).
| m=9 mm=09 |
s |
Display the second of the minute (0-59).
| s=9 ss=09 |
S |
Display milliseconds.
| S=5 SSS=500 |
Z | Display the RFC 822 time zone. | Z=-0800 |
X |
Display the ISO 8601 time zone.
Note: If the time zone offset is zero, the letter Z is displayed. | X=-08 XX=-0800 XXX=-08:00 |
You can use Date and Time of Day Format strings in these areas:
These examples show how date and time patterns can change the way date and time values are displayed:
Example | Result |
---|---|
yyyy-MM-dd HH:mm:ss.SSS | 2019-03-10 10:16:23.780 Note: This is the default date and time pattern. |
dd-MMM-yyyy HH:mm:ss.S | 10-Mar-2019 10:16:23.7 |
yyyy-MM-ddtHH:mm:ss.SSSXXX | 2019-03-10t10:16:23.780-08:00 Note: Complies with ISO 8601. |
hh 'o''clock' a | 12 o'clock PM |
To learn how to format numbers.
To learn about other Fernhill SCADA Concepts.
To learn how to format dates and times in IEC 61131-3 code.
For the meaning of terms used in Fernhill SCADA.