Formats |
Category: | Date and Time |
Alignment: | right |
Syntax | |
Syntax Description | |
Details | |
Comparisons | |
Examples | |
See Also |
Syntax |
TODw.d |
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. |
specifies the number of digits to the right of the decimal point in the seconds value. This argument is optional.
Default: | 0 |
Range: | 0-19 |
Requirement: | must be less than w |
Details |
The TODw.d format writes SAS time and datetime values in the form hh:mm:ss.ss, where
Comparisons |
The TODw.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.
Examples |
In the following example, the SAS datetime value 1566742823 corresponds to August 24, 2009 at 2:20:23 p.m.
SAS Statement | Results |
---|---|
|
----+----1 |
begin = '1:30't;
put begin tod5.; |
01:30 |
begin = 1566742823; put begin tod9.; |
14:20:23 |
See Also |
| |||||||
| |||||||
|
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.