Click or drag to resize

9.3.3 Date, Time, and Serial Number Fields

Field Format Specifiers can be used in string contexts to introduce fields which will be automatically generated during the marking process.

Amongst other things, they can be used to generate:

  • Automatically updated Date and Time Stamps.

    See: AppendMarkTime

  • Serial Numbers.

Date and Time Field Format Specifiers

The time and date format specifier is a string containing replaceable Field designators embedded in ordinary text.

Each replaceable field designator consist of a Width designator and a Type designator, as shown below.

All other text is output verbatim.

Replaceable Field Designators

Width Designator

Output width

%

Minimum necessary to display all significant digits.

$

Fixed at 2 digits, padded with leading zero(s), if necessary.

Type Designator

Output

Y

Year

m

Month number

D

Day-of-Week number

H

Hours

M

Minutes

S

Seconds

Generated Output Field Examples

The Output column shows what would have been generated at 11:03:05AM on 13th July 2015.

Field Designator

Output

%Y

2015

%m

7

%D

13

%H

11

%M

3

%S

5

 

 

$Y

15

$m

07

$D

13

$H

11

$M

03

$S

05