Time Mask

You can use the SAPscript SET TIME MASK command to format time fields in a way that differs from the standard setting. Executing this command causes all subsequent time fields to be printed with the specified formatting.


/: SET TIME MASK ='time_mask'

The following templates may be used in the time mask:

HH hours (two digits)
MM minutes (two digits)
SS seconds (two digits)

Any other characters occurring in the mask are interpreted as simple text and are copied directly to the output.

Assuming the current time is 10:08:12.

&TIME& -> 10:08:12

&TIME& -> 10:08

/: SET TIME MASK = 'HH hours MM minutes'
&TIME& -> 10 hours 08 minutes
&TIME(Z)& -> 10 hours 8 minutes

You can revert to the standard setting by using the SET TIME MASK command again with an empty string in place of the time mask:

/: SET TIME MASK = ' '