Date and Time Constants

To create date and time constants, each unit of date and time has its own code which can only be used in combination with numeric integer constants.

For example, 17n is valid, $REG$n is not valid, but the expression $REG$*1n is valid.

There are no date and time constant codes for months or years because neither of these contains a fixed number of days; if you need to add or subtract months from a date, use the addmonths statement. Weeks are not represented here because they are superfluous, that is, a week is always seven days ( 7d).

Codes for Date and Time Constants
Code Meaning Examples Value (fraction of 1 day)
d Day 1d

3d

1

3

h Hour 1h

2h

1d6h

1/24

1/12

1 & 1/4

n Minute 1n 1/1,440
s Second 1s

1n2s

1/86,400

62/86,400 or 31/43,200

t Tick 1t

5t

1/8,640,000

5/8,640,000 or 1/1,728,000

Related Topics