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.
Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.