Language Reference

Date and Time Functions

DATDIFreturns the number of days between two dates
DATEreturns the current date as a SAS date value
DATEJULconverts a Julian date to a SAS date value
DATEPARTextracts the date from a SAS datetime value
DATETIMEreturns the current date and time of day as a SAS datetime value
DAYreturns the day of the month from a SAS date value
DHMSreturns a SAS datetime value from date, hour, minute, and seconds
HMSreturns a SAS time value from hour, minute, and seconds
HOURreturns the hour from a SAS time or datetime value
INTCKreturns the integer number of time intervals in a given time span
INTNXadvances a date, time, or datetime value by a given interval, and returns a date, time, or datetime value
JULDATEreturns the Julian date from a SAS date value
JULDATE7returns a seven-digit Julian date from a SAS date value
MDYreturns a SAS date value from month, day, and year values
MINUTEreturns the minute from a SAS time or datetime value
MONTHreturns the month from a SAS date value
QTRreturns the quarter of the year from a SAS date value
SECONDreturns the second from a SAS time or datetime value
TIMEreturns the current time of day
TIMEPARTextracts a time value from a SAS datetime value
TODAYreturns the current date as a SAS date value
WEEKDAYreturns the day of the week from a SAS date value
YEARreturns the year from a SAS date value
YRDIFreturns the difference in years between two dates
YYQreturns a SAS date value from the year and quarter

Previous Page | Next Page | Top of Page