![]() Chapter Contents |
![]() Previous |
![]() Next |
| DATETIMEw. |
| Category: | Date and Time |
| Syntax | |
| Syntax Description | |
| Details | |
| Examples | |
| See Also |
Syntax |
| DATETIMEw. |
| Default: | 18 |
| Range: | 13-40 |
| Details |
The datetime values must be in the following form: ddmmmyy or ddmmmyyyy, followed by a blank or special character, followed by hh:mm:ss.ss (the time). In the date,
DATETIMEw. requires values for both the date and the time; however, the ss.ss portion is optional.
Note: SAS interprets a two-digit year as belonging to the 100-year span that is
defined by the YEARCUTOFF= system option. ![[cautionend]](../common/images/cautend.gif)
Note: SAS can read time values with AM and PM in
them. ![[cautionend]](../common/images/cautend.gif)
| Examples |
input date_and_time datetime20.;
| Data Lines | Results |
|---|---|
----+----1----+----2 |
|
16mar97:11:23:07.4 |
1237202587.4 |
16mar1997/11:23:07.4 |
1237202587.4 |
16mar1997/11:23 PM |
1237245780.0 |
| See Also |
Formats:
| |||||||
Function:
| |||||||
Informats:
| |||||||
System
Option:
| |||||||
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.