TODw.d Format

Writes SAS time values and the time portion of SAS datetime values in the form hh:mm:ss.ss.

Category: Date and Time
Alignment: Right

Syntax

TODw.[d]

Arguments

w

specifies the width of the output field.

Default 8
Range 2–20
Tip SAS writes a zero for a zero hour if the specified width is sufficient, for example, 02:30 or 00:30.

d

specifies the number of digits to the right of the decimal point in the seconds value.

Default 0
Range 0–19
Requirement must be less than w

Details

The TODw.d format writes SAS datetime values in the form hh:mm:ss.ss, where
hh
is an integer that represents the hour.
mm
is an integer that represents the minutes.
ss.ss
is the number of seconds to two decimal places.

Comparisons

The TOWw.d format writes a leading zero for a single-hour digit. The TIMEw.d format and the HHMMw.d format write a leading blank for a single-hour digit.

Example

Statements
Results
select put(1472049623,tod9.);
 14:40:23
Last updated: February 23, 2017