Date and Time Syntax

The syntax for date and time formats is given below. You can display many formats, such as days, months, and years, in full or in truncated form, depending on the number of times that you enter a particular code character—details are given below.

Rows that have a shaded background indicate legacy date and time syntax. Product releases from ClearSCADA 2014 R1 inclusive do not support the use of such legacy syntax for date and time controls on methods and pick actions, or the clock that you can display on a ViewX client's status bar. We recommend that you phase out such legacy syntax if it is used on your system. For more information, see Actions that are Common to Many Drivers and see Miscellaneaous Options for ViewX Clients.

Code Description Appearance Example

Insert a single quote at start and end of any string to indicate plain text.

Single quote, entered twice

a

AM/PM indicator

text

AM

d

Day in month
(minimum number of digits displayed)

number

9

dd

Day in month
(two digits always displayed)

number

09

D

Day in year
(minimum number of digits displayed)

number

5
(for fifth day in the year)

156
(for 156th day)

DDD

Day in year
(three digits always displayed)

number

005
(for fifth day in the year)

156
(for 156th day)

EEE

Day in week
(first three characters displayed)

text

Wed
(for ‘Wednesday’)

EEEE

Day in week (full text)

text

Wednesday

F

Day of week in month
(minimum number of digits displayed)

number

2
(for second week in the month)

FF

Day of week in month
(two digits always displayed)

number

02
(for second week in the month)

G

Era

text

AD

h

Hour in 12-hour clock (1 to 12)
(minimum number of digits displayed)

number

8

12

hh

Hour in 12-hour clock (1 to 12)

(two digits always displayed)

number

08

12

H

Hour in 24-hour clock (0 to 23)
(minimum number of digits displayed)

number

7

18

HH

Hour in 24-hour clock (0 to 23)
(two digits always displayed)

number

07

18

k

Hour in day (24-hour clock, 1 to 24)
(minimum number of digits displayed)

number

5

23

kk

Hour in day (24-hour clock, 1 to 24)
(two digits always displayed)

number

05

23

K

Hour in day (12-hour clock, 0 to 11)
(minimum number of digits displayed)

number

3

10

KK

Hour in day (12-hour clock, 0 to 11)
(two digits always displayed)

number

03

10

m

Minute in hour
(minimum number of digits displayed)

number

4

30

mm

Minute in hour
(two digits always displayed)

number

04

30

M

Month in year
(minimum number of digits displayed)

number

6
(for June)

MM

Month in year
(two digits always displayed)

number

06
(for June)

MMM

Month in year
(truncated)

text

Aug
(for ‘August’)

MMMM

Month in year
(full text)

text

August

s

Second in minute
(minimum number of digits displayed)

number

5

24

ss

Second in minute
(two digits always displayed)

number

05

24

S

Deciseconds
(one digit displayed)

number

0

3

SS

Centiseconds
(two digits always displayed)

number

01

32

SSS

Milliseconds
(three digits always displayed)

number

016

327

w

Week in year
(minimum number of digits displayed)

number

5

32

ww

Week in year
(two digits always displayed)

number

05

32

W

Week in month

number

3

yy

Year
(truncated to display last two digits only)

number

03

yyyy

Year
(all four digits)

number

2003

z

Time zone

text

GMT+01:00

Example:

The code d.M.yy displays a date in the form:

14.2.03

 

The code dd.MM.yy displays a date in the form:

14.02.03

(where entries are zero-padded if the figures are shorter than the specified amount of characters.)

 

The code EEE, MMM d, “yy displays a date in the form:

Fri, Feb 14, ‘03

 

The code EEEE, MMMM d, yyyy displays a date in the form:

Friday, February 14, 2003

 

The code ‘Today’’s date is: ‘EEEE, d MMMM displays:

Today’s date is: Friday, 14 February


Disclaimer

Geo SCADA Expert 2022