Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello to you all,
I have a column with mix date format (actually this column is character type)
how can i change the string to make them all in the same convention ?
lets say make them all mm-dd-yyyy hh:mm
09/27/2011 09:49
28-09-2011 15:25
09/27/2011 10:55
09/27/2011 11:22
09-11-2011 21:44
09/27/2011 11:19
09-11-2011 19:40
09-11-2011 16:42
09-11-2011 18:30
28-09-2011 13:10
Thanks
T.
Use replace() function, and some formatting may be helpful. This should work in most cases here:
timestamp(timestamp#(replace(yourfield,'/','-'), 'MM-DD-YYYY hh:mm'))
But you cannot guess if your 09-11 is Sep 11 or Nov 9 - you need some cleanup in the data source anyway.
Use the following:
timestamp(timestamp#(KeepChar(Fieldname,'0123456789 :'),'MMDDYYYY hh:mm')).
Krian.