12-06-2013 12:40 PM
I am needing some help in changing a datetime format back to a date format. For example, I have a value of 28OCT2013:21:26:58.819000
How can I create another variable and keep only the first 9 characters, in this case 28OCT2013 ? Can I do a simple SUBSTR command?
Help would be much appreciated!
12-06-2013 12:50 PM
You could use the DATEPART function. Or, simply apply a DATE format and leave the original value as is! See:
12-09-2013 01:17 PM
Thanks for the quick response.
I tried doing the simple date format, I used
28OCT2013:21:26:58.819000 (variable is called ofr_create_dt) and if I simply put
date(ofr_creat_dt) as date1
I got back a result of 19701?