Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date format Conversion

Hi there,

I have a date  with this format: Apr  13 2012  1:07PM and i want to convert it into 13/4/2012.

Any help?!

Thank you.

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Try replacing the double spaces with single spaces:

date(floor(timestamp#(replace(DATEFIELD,'  ',' '),'MMM DD YYYY h:mmTT')),'DD/M/YYYY') as NEWDATEFIELD


talk is cheap, supply exceeds demand

View solution in original post

6 Replies
Anonymous
Not applicable
Author

date(floor(timestamp#(DATEFIELD,'MMM  DD YYYY  h:mmTT')),'DD/M/YYYY') as NEWDATEFIELD

Not applicable
Author

Thank you for your answer!

The problem remailns unfortunately in most of the records even though some have been transformed the way i wanted to.

For example: Feb  6 2012  9:26AM has been successfuly changed

But  Feb  6 2012 11:38AM has not.

er_mohit
Master II
Master II

you change format hh:mmTT as expression in johannes sunden

hope this will helps you

Gysbert_Wassenaar

Try replacing the double spaces with single spaces:

date(floor(timestamp#(replace(DATEFIELD,'  ',' '),'MMM DD YYYY h:mmTT')),'DD/M/YYYY') as NEWDATEFIELD


talk is cheap, supply exceeds demand
Not applicable
Author

Thank you all! I fixed it!

Anonymous
Not applicable
Author

Haha, and I paid such attention to get the double spaces in there to match the date format you posted in the original post..

Glad you got it up and running mate!