Time

<< Click to Display Table of Contents >>

Navigation:  Appendix > Macros >

Time


 

editor.icon Time

 


 

The Time macro inserts the current time. Multiple time formats are available, as detailed below.

 

The syntax for this macro is %[Time] and 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 (as detailed below).

 

Example

 

Follow the steps below to use the Time macro to create a watermark that inserts a customized version of the current time:

 

1. Click the Organize tab.

 

2. Click Watermarks, then click Add. The Add Watermark dialog box will open.

 

3. Enter %[Time:H:mm tt] in the Text text box. A customized version of the time is then added as a watermark:

 

time.watermark.example

Figure 1. %[Time] Macro Example

 

Note that this macro is often used in conjunction with other macros in order to create combined output. For example the combined macros %[Time:H:mm] %[Month]/%[Day] output the current time followed by the month and the day of the month:

 

month.macro.example.two

Figure 2. %[Time] Combined Macro Example