11-03-2014 05:56 PM
I have a date value
i would Like to convert it in
I am using below piece of code but it's not working
11-03-2014 06:18 PM
Your values are dates so you don't need the date part function. The format you want is a SAS format, datetime21 so you can apply that directly. The code below demonstrates this, time_want is the numeric version of the variable and time_want_char is the character version of the variable.
time_want=dhms(time, 0, 0, 0);
format time time_want datetime21. time2 date9.;