Reads and extracts the date value 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
|
TIME
|
14:30
14:30:08.05
|
DDMMYY
|
010112
01012012
|
YMDDTTM
|
12-01-01 11:23
|
JULIAN
|
12001
2012001
|
YYMMDD
|
120101
20120101
|
MDYAMPM
|
01-01-12 3:53 pm
|
YYQ
|
12Q1
2012Q1
|
MMDDYY
|
010112
01012012
|
YY<YY>xMM 1
|
12/01
2012-01
|
MMxYY<YY> 1
|
01/12
01-2012
|
month-day-year
|
January 1, 2012
|
1x is a special character that separates the month from the year. |
input dateinfo anydtdte21.;
Data Line
|
Informat Form
|
Result
|
Formatted with the DATEw.
Format
|
---|---|---|---|
----+----1----+----2 |
|
|
|
01JAN12 |
DATE
|
18993 |
01JAN12 |
01JAN2012 14:30:08.5 |
DATETIME
|
18993 |
01JAN12 |
01012012 |
DDMMYY
|
18993 |
01JAN12 |
2012001 |
JULIAN
|
18993 |
01JAN12 |
01/01/12 |
MMDDYY
|
18993 |
01JAN12 |
JAN2012 |
MONYY
|
18993 |
01JAN12 |
14:30 |
TIME
|
0 |
01JAN60 |
20120101 |
YYMMDD
|
18993 |
01JAN12 |
12q1 |
YYQ
|
18993 |
01JAN12 |
January 1, 2012 |
none
|
18993 |
01JAN12 |