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.
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss. Register now and lock in 2025 pricing—just $495!