Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a date field, example,
19-Jul-2018 1:34PM |
and I would like to convert to
07/19/2018
How would this be most easily accomplished in load script?
Hello,
Date(Floor(Timestamp#('19-Jul-2018 1:34PM', 'DD-MMM-YYYY hh:mmtt')))
if you need a preceding 0 in the month then change the variable edit script.
SET DateFormat='MM/DD/YYYY';
or
Date(Floor(Timestamp#('19-Jul-2018 1:34PM', 'DD-MMM-YYYY hh:mmtt')), 'MM/DD/YYYY')
Thanks.
TRY THIS
date(Date#(Datefield,'DD-MMM-YYYY hh:mmTT'),'DD/MM/YYYY') as newdate
Hi Dave, use Date(Date#('19-Jul-2018 1:34PM','DD-MMM-YYYY hh:mmtt'),'DD/MM/YYYY')
It should work. Regards!
My bad
date(Date#(Datefield,'DD-MMM-YYYY hh:mmTT'),'MM/DD/YYYY') as newdate
OR
date(Date#(Datefield,'19-Jul-2018 1:34PM'),'07/19/2018') as newdate
Try
date#(date(Date_FIELD),'MM/DD/YYYY') as date
Hello,
Date(Floor(Timestamp#('19-Jul-2018 1:34PM', 'DD-MMM-YYYY hh:mmtt')))
if you need a preceding 0 in the month then change the variable edit script.
SET DateFormat='MM/DD/YYYY';
or
Date(Floor(Timestamp#('19-Jul-2018 1:34PM', 'DD-MMM-YYYY hh:mmtt')), 'MM/DD/YYYY')
Thanks.
Thank you kind sir!!!!!!!
May be another way is like:
Date(Date#(Trim(Subfield(Timestmp, ' ',1)), 'DD-MMM-YYYY'),'MM/DD/YYYY') AS TimeID