Reads and extracts time values from various date, time, and datetime forms.
Category: | Date and Time |
Informat or Form of
Input
|
Example Data
|
Informat or Form of
Input
|
Example Data
|
---|---|---|---|
DATE
|
01JAN12
01JAN2012
|
MONYY
|
JAN12
JAN2012
|
DATETIME
|
01JAN12 14:30:08
01JAN2012 14:30:08.5
|
YYMMDD
|
120101
20120101
|
DDMMYY
|
010112
01012012
|
YYQ
|
12Q1
2012Q1
|
JULIAN
|
12001
2012001
|
YYQ
|
12Q1
2012Q1
|
MMDDYY
|
010112
01012012
|
month-day-year
|
January 1, 2012 2012-01
|
Use of Colons and Periods
|
Example
|
---|---|
a single colon in the
value h:m indicates
hours and minutes
|
14:30
|
two colons in the value
h:m:s indicate hours, minutes, and seconds
|
14:30:08
|
a single period in the
value m:s.ff, where ff is a fraction of a second, indicates that the
number preceding the period is the number of seconds
|
2:39.66
|
multiple periods in
the value indicate that the period is a delimiter for dates and the
value is not a time value.
|
12.25.2012
|
input dateinfo anydttme21.;
Data Line
|
Informat
|
Result
|
Formatted with the TIMEw.d Format
|
---|---|---|---|
----+----1----+----2 |
|
|
|
01JAN12 |
DATE
|
0 |
00:00:00 |
01JAN2012 14:30:08.5 |
DATETIME
|
52208.5 |
14:30:09 |
010112 |
DDMMYY
|
0 |
00:00:00 |
2012001 |
JULIAN
|
0 |
00:00:00 |
01012012 |
MMDDYY
|
0 |
00:00:00 |
JAN2012 |
MONYY
|
0 |
00:00:00 |
14:30:08.5 |
TIME
|
52208.5 |
14:30:09 |
20120101 |
YYMMDD
|
0 |
00:00:00 |
12Q1 |
YYQ
|
0 |
00:00:00 |
January 1, 2012 |
month-day-year
|
0 |
00:00:00 |