Every now and again I get to right some SAS code.
And every know and again I need to transform SAS dates, from Date/Time to Date9 or from Date to Date/Time etc.
Its one thing that I always end up looking at SAS support for the correct syntax. So Im going to post each one I use here so I can find them easily.
SAS Date to Date/Time
To convert a SAS date to a SAS Date/Time, by adding a time of 00:00:00 to it use:
dhms(<date_variable_name>,0,0,0)
myDateTime = date_variable_name * 86400;
Nice and easy but done out of habit.
Alan