Tag: datetime

How to convert the datetime character string to SAS datetime value? (ANYDTDTM and MDYAMPM formats)

When we have a string like this “9/01/2010 11:52:54 AM” and would like to translate the string to a numeric SAS date time variable, most of the times we use SCAN function to extract the information to get the DATETIME format. This is definitely a ted…

SAS INTNX function ( add days, months, years, etc )

The INTNX function increments dates, times, or datetimes by specific or custom intervals. Here is the basic syntax for INTNX: INTNX(interval[multiple.shift-index], start, increment[, alignment]) The interval can be a set value like – DAY, WEEK, DTWEEK, YEAR, etc. You can also specify a custom interval. We will post more on that later. The multiple is […]