|
|
| ? |
? |
HOUR |
19434 |
5 |
| ? |
? |
JULDATE 1 |
19434 |
13076 |
| ? |
? |
JULDATE7 1 |
19434 |
2013076 |
| ? |
? |
MINUTE |
19434 |
23 |
| ? |
? |
MONTH |
19434 |
3 |
| ? |
? |
QTR |
19434 |
1 |
| ? |
? |
SECOND |
19434 |
54 |
| ? |
? |
WEEKDAY |
19434 |
1 |
| ? |
? |
YEAR |
19434 |
2013 |
| Write a date as a constant in an expression |
SAS date constant |
'ddmmmyy'd or 'ddmmmyyyy'd |
'17mar13'd '17mar2013'd |
19434 |
| Write today's date as a string |
SYSDATE automatic macro variable |
SYSDATE |
&SYSDATE |
The date at the time of SAS initialization in the form DDMMMYY. |
| ? |
SYSDATE9 |
SYSDATE9 |
&SYSDATE9 |
The date at time of SAS initialization, in the form DDMMMYYYY. |
| Time Tasks |
| Write SAS time values as time values |
time formats |
HHMM. |
19434 |
5:24 |
| ? |
? |
HOUR. |
19434 |
5 |
| ? |
? |
MMSS. |
19434 |
323 |
| ? |
? |
TIME. |
19434 |
5:23:54 |
| ? |
? |
TIMEAMPM. |
19434 |
5:23:54 AM |
| ? |
? |
TOD. |
19434 |
05:23:54 |
| Read time values as SAS time values |
Time informats |
TIME. |
05:23:54 |
19434 |
| Write the current time as a string |
SYSTIME automatic macro variable |
SYSTIME |
&SYSTIME |
The time at the moment of execution, in the form HH:MM |
| Return the current time of day as a SAS time value |
Time functions |
TIME( ) |
( ) |
The SAS time value at moment of execution, in the form NNNNN.NNN. |
| Return the time part of a SAS datetime value |
Time functions |
TIMEPART |
17mar2013 05:11:43 |
5:11:43 |
| Datetime Tasks |
| Write SAS datetime values as datetime values |
Datetime formats |
DATEAMPM |
1679097600 |
17MAR13:12:00:00 AM |
| ? |
? |
DATETIME |
1679097600 |
17MAR13:00:00:00 |
| Read datetime values as SAS datetime values |
Datetime informats |
DATETIME |
17MAR13:00:00:00 |
1679097600 |
| Return the current date and time of day as a SAS datetime value |
Datetime functions |
DATETIME() |
() |
The SAS datetime value at the moment of execution, in the form NNNNNNNNNN.N. |
| Interval Tasks |
| Return the number of specified time intervals that lie between the two date or datetime values |
Interval functions |
INTCK |
week2 01aug60 01jan13 |
1368 |
| Advances a date, time, or datetime value by a given interval, and returns a date, time, or datetime value |
Interval functions |
INTNX |
day 17mar12 365 |
19434 |
| 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. |