sas日期格式
DATETIMEw. Informat
1647559380.0
DATEw. Format
Writes date values in the form ddmmmyy, ddmmmyyyy, or dd-mmm-yyyy.
Category:
Date and Time
Alignment:
Right
Syntax
Syntax Description
Details
Example
See Also
Syntax
DATEw.
Syntax Description
w
specifies the width of the output field.
Default
7
Range
5–11
Tip
Use a width of 9 to print a four-digit year without a separator between the day, month, and year. Use a width of 11 to print a four-digit year using a hyphen as a separator between the day, month, and year
Details
The DATEw. format writes SAS date values in the form ddmmmyy, ddmmmyyyy, or dd-mmm-yyyy, where
dd
is an integer that represents the day of the month.
mmm
is the first three letters of the month name.
yy or yyyy
is a two-digit or four-digit integer that represents the year.
Example
The example table uses the input value of 19068, which is the SAS date value that corresponds to March 16, 2012.
SAS Statement
Result
----+----1----+
put day date5.;
16MAR
put day date6.;
16MAR
put day date7.;
16MAR12
put day date8.;
16MAR12
put day date9.;
16MAR2012
put day date11.;
16-MAR-2012
JULDAY. 1 | ||||
JULIAN. 1 | ||||
PDJULG. 1 | ||||
PDJULI. 1 | ||||
1In SAS, a Julian date is a date in the form YYNNN or YYYYNNN, where YY is a two-digit year, YYYY is a four-digit year, and NNN is the ordinal offset from January 1 of the year YY or YYYY. SAS processes Julian dates only for valid SAS dates. |
JULIAN. 1 | ||||
JULIAN7. 1 | ||||
JULDATE 1 | ||||
JULDATE7 1 | ||||
1In SAS, a Julian date is a date in the form YYNNN or YYYYNNN, where YY is a two-digit year, YYYY is a four-digit year, and NNN is the ordinal offset from January 1 of the year YY or YYYY. SAS processes Julian dates only for valid SAS dates. |
原文地址:http://blog.csdn.net/myhaspl/article/details/44702349