Professional Documents
Culture Documents
Function Arguments
Function Results
Function Categories
Host Functions
Arithmetic Functions
Quantile Functions
Bitwise Logical Functions
Probability and Density Functions
Character Functions
Character String Matching Functions
Random Number Functions
SAS File I/O Functions
Sample Statistic Functions
Date and Time Functions
Dynamic Link Library
Special Functions
External File Functions
State and Zip Code Functions
Financial Functions
Trigonometric Functions
Library and Catalog Functions
Truncation Functions
Mathematical Functions
DBCS Functions
Variable Information Functions
Noncentrality Functions Web Tools
DATE()
DATEJUL(julian-date)
DATEPART(datetime)
DATETIME()
DAY(date)
DHMS(date,hour,minute,second)
HMS(hour,minute,second)
HOUR(<time | datetime>)
INTCK('interval',from,to)
INTNX('interval',startfrom,increment<,'alignment'>)
JULDATE(date)
MDY(month,day,year)
MINUTE(time | datetime)
MONTH(date)
QTR(date)
SECOND(time | datetime)
TIME()
TIMEPART(datetime)
TODAY()
WEEKDAY(date)
YEAR(date)
YRDIF(sdate,edate,basis)
YYQ(year,quarter)
Description
Width Default
Range Width
DATEw.
5-9
7-40
19
DATETIMEw.d
7-40
16
DAYw.
2-32
DDMMYYw.
2-10
DDMMYYxw.
2-10
DOWNAMEw.
1-32
DTDATEw.
5-9
EURDFDDw.
2-8
EURDFDEw.
5-9
EURDFDNw.
1-32
EURDFDTw.d
7-40
16
EURDFDWNw.
1-32
EURDFMNw.
1-32
EURDFMYw.
5-7
EURDFWDXw.
EURDFWKXw.
1-38
HHMMw.d
2-20
2-20
JULDAYw.
3-32
JULIANw.
5-7
MINGUOw.
1-12
MMDDYYw.
2-8
MMDDYYxw.
2-10
MMSSw.d
2-20
MMYYxw.
5-32
MONNAMEw.
1-32
MONTHw.
1-21
MONYYw.
5-7
NENGOw.
2-10
10
PDJULGw.
PDJULIw.
QTRw.
1-32
the year
QTRRw.
TIMEw.d
2-20
11
TODw.d
2-20
WEEKDATEw.
3-37
29
WEEKDATXw.
3-37
29
WEEKDAYw.
1-32
WORDDATEw.
3-32
18
WORDDATXw.
3-32
18
YEARw.
2-32
YYMMxw.
5-32
YYMMDDw.
2-8
YYMMDDxw.
2-10
YYMONw.
5-32
YYQw.
4-6
YYQxw.
5-32
YYQRxw.
Description
Width
Range
Default
Width
DATEw.
7-32
DATETIMEw.
13-40
18
DDMMYYw.
6-32
EURDFDEw.
7-32
EURDFDTw.
13-40
18
EURDFMYw.
JULIANw.
5-32
MINGUOw.
6-10
MMDDYYw.
6-32
mmddyy or mmddyyyy
MONYYw.
5-32
MSECw.
NENGOw..
7-32
10
PDTIMEw.
PDJULGw.
PDJULIw.
RMFDURw.
TIMEw.d
5-32
YYMMDDw.
6-32
YYMMNw.
4-6
YYQw.
4-32