Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How do I change the date format?
Current: 2010-04-01 00:00.00.00 plus even more zeros
Desired: 4-1-2010
Example script:
Frog,
Toad,
Date,
Country
Thank you.
Hi,
Try this:
Date(Date, 'mm-dd-yyyy')
Kind regards
Hi
either change it on the main tab or wrap the DATE() Function around the data
DATE(Date,"MM-DD-YYYY") as Date
Oh peculiar. It's not working. I must still be doing something wrong. Ok, I'm changing the name of date and placement for this example. Maybe that will help you figure it out? Or maybe it won't make a difference and I just can't get it to work.
Example script:
Frog,
Toad,
Lisa_Date
WHERE
The following two attempts do not work:
Attempt 1:
Lisa_Date(Date,'MM-DD-YYYY')
Attempt 2:
Lisa_Date(Date,"MM-DD-YYYY") as Lisa_Date
Hi,
You should put Lisa_Date inside and not outside, like below:
Date(Lisa_Date,"MM-DD-YYYY") as Lisa_Date
Kind regards
Thanks for the clarification. I'll give it a try!
maybe like this?
table1:
LOAD *,
Date(Date#(SubField(Current,' ',1),'YYYY-MM-DD'),'M-D-YYYY') as Desired
Inline [
Current
2010-04-01 00:00.00.00
2010-04-02 00:00.00.000
2010-05-01 00:00.00.0000
2010-05-02 00:00.00.00000
2010-06-01 00:00.00.000000
2010-06-02 00:00.00.0000000
];
hope this helps
Marco