03-31-2016 05:13 AM
You would need to specify the missing components, for example:
data want; set have; new_variable=dhms(your_date,0,0,0); format new_variable datetime.; run;
03-31-2016 05:33 AM
There are plenty: Formats by Category
And if none fit your bill you can roll your own. Look at PROC FORMAT, specifically te PICTURE statement with the DATATYPE=DATETIME directive. It knows no bounds.
Hope this helps,
03-31-2016 05:35 AM
And I almost forgot: a variable is not in a specific format. It can be a numeric variable with the presentation lossely coupled. You can present your data in any format without actually modyfying the values in the table. data and presentation are separate unless you choose to store the dates as character.
Need further help from the community? Please ask a new question.