%MSECONDS (Number of Microseconds)

%MSECONDS(number)

%MSECONDS converts a number into a duration that can be added to a time or timestamp value.

%MSECONDS can only follow the plus or minus sign in an addition or subtraction expression. The value before the plus or minus sign must be a time or timestamp. The result is a time or timestamp value with the appropriate number of microseconds added or subtracted. For a time, the resulting value is in *ISO format.

You can also use %SECONDS to add or subtract microseconds or any other size of fractional seconds such as milliseconds to a timestamp by specifying a value with decimal positions. %SECONDS(.000005) and %MSECONDS(5) both represent 5 microseconds. %SECONDS(.123) represents 123 milliseconds. See %SECONDS (Number of Seconds) for more information.

For an example of date and time arithmetic operations, see Figure 1.

For more information, see Date Operations or Built-in Functions.