Please assist me with converting a date variable from 05AUG2014:00:00:00.000 to 201408 in a one line in proc sql query. I've been using this but its not working:
In SAS, date values are (integer) counts of days from 1960-01-01 (this day is day zero). Time and date values are counts of seconds, from 00:00:00 (time) or 1960-01-01T00:00:00 (datetime).
To make a count of seconds into a count of days, you use the DATEPART function, as already explained.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!