Date and Time Macros

<< Click to Display Table of Contents >>

Navigation:  PDF-XChange Standard V7 User Manual > Printer Settings > Macros >

Date and Time Macros


 

Main-Image Date and Time Macros

 


 

There are several macros in PDF-XChange Standard that are used to create date and time output. They operate in an identical manner from a practical point of view and are often used in conjunction with each other. The date and time macros are detailed below:

 

%[Date]

 

The %[Date] macro adds the current date. The following parameters are available:

 

d inserts the day of the month and omits the zero in cases of single-digit values.

dd inserts the day of the month and includes a zero in cases of single-digit values.

ddd inserts the day of the week as a three-letter abbreviation.

dddd inserts the day of the week.

M inserts the month as a numerical value and omits the zero in cases of single-digit values.

MM inserts the month as a numerical value and and includes a zero in cases of single-digit values.

MMM inserts the month as a three-letter abbreviation.

MMMM inserts the month.

yy inserts the year as two digits and adds a zero in cases of values lower than 10.

yyyy inserts the year.

 

The syntax for this macro when parameters are used is %[Date:<Parameter>]

 

Note that several parameters can be used in sequence in order to insert a customized date. For example, %[Date:dddd, dd MMMM yyyy] inserts the day of the week followed by the day of the month, the month name in full and the year as four digits:

 

example.date.macro

Figure 1. Add/Edit Watermark Dialog Box, Example %[Date] Macro

 

If parameters are not specified for this macro then output reverts to default, which is the the format d/M/yyyy.

 

%[Year]

 

The %[Year] macro adds the current year as a four-digit value.

 

%[Month]

 

The %[Month] macro adds the current month as a numerical value from 1-12.

 

%[Day]

 

The %[Day] macro adds the current day of the month as a two-digit value.

 

%[Time]

 

The %[Time] macro adds the current time. The following parameters are available:

 

h inserts the hour and omits the zero in cases of single-digit values.

hh inserts the hour and includes a zero in cases of single-digit values.

H inserts the hour, includes a zero in cases of single-digit values and uses a 24 hour-clock.

m inserts the minutes and omits the zero in cases of single-digit values.

mm inserts the minutes and includes a zero in cases of single-digit values.

s inserts the seconds and omits the zero in cases of single-digit values.

ss inserts the seconds and includes a zero in cases single-digit values.

t inserts a single character to reference the a.m./p.m. variable: A or P.

tt inserts two characters to reference the a.m/p.m. variable: AM or PM.

 

The syntax for this macro when parameters are used is %[Time:<Parameter>]

 

Note that several parameters can be used in sequence in order to insert a customized time. For example, %[Time:H:mm tt] inserts the current hour and minutes, and inserts two characters to reference the a.m./p.m. variable:

 

example.time.macro

Figure 2. Add/Edit Watermark Dialog Box, Example %[Time] Macro

 

%[Hour]

 

The %[Hour] macro adds the hour value from the current time.

 

%[Minute]

 

The %[Minute] macro adds the minute value from the current time.

 

%[Seconds]

 

The %[Seconds] macro adds the second value from the current time.

 

Note that these macros can be combined as desired.