Previous Page | Next Page

Date Intervals, Formats, and Functions

Datetime and Time Formats

Table 4.4 lists some of the datetime and time formats available in the SAS system. For each format, an example is shown of a datetime value in the notation produced by the format. The datetime value '17OCT91:14:25:32'DT is used as the example.

Table 4.4 Frequently Used SAS Datetime and Time Formats

Format

 

Width

Default

Example

Description

Range

Width

DATETIMEw.d

ddMONyy:hh:mm:ss

7–40

16

17OCT91:14:25:32

     

DTWKDATXw.

day-of-week, dd month yyyy

3–37

29

Thursday, 17 October 1991

     

HHMMw.d

hour and minute: hh:mm

2–20

5

14:25

     

HOURw.d

hour

2–20

2

14

     

MMSSw.d

minutes and seconds: mm:ss

2–20

5

25:32

     

TIMEw.d

time of day: hh:mm:ss

2–20

8

14:25:32

     

TODw.d

time of day: hh:mm:ss

2–20

8

14:25:32

     
Previous Page | Next Page | Top of Page