Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
My excel sheet date field have different formates of dates are available..so i need to make a proper format.How can achieve this.
Hi All,
I tried with the below script. Not working.
Data:
load *, Date(Alt(Date#(Date, 'DD-MM-YYYY'), Date#(Date, 'MM-DD-YYYY'), Date#(Date, 'YYYY-DD-MM')), 'DD-MM-YYYY') as Date_Format2;
Load * , Date(Date#(Date, 'DD-MM-YYYY'), 'DD-MM-YYYY') As Date_Format1;
LOAD Date,sales INLINE
[
Date,sales
1/2/2009,400
2/13/2009,5000
2009/15/2,3000
3/17/2009,1
];
LOAD Date(Alt (date#(Date, 'MM/DD/YYYY'),date#(Date, 'YYYY/DD/MM'),date#(Date, 'MM/DD/YYYY')),'YYYY-MM-DD') as Date,sales
INLINE
[
Date,sales
1/2/2009,400
2/13/2009,5000
2009/15/2,3000
3/17/2009,1
];
That'd be because you haven't set up an alt condition for any of your date formats.....
You have formats of DD/MM/YYYY, MM/DD/YYYY and YYYY/DD/MM in your data and have set up conditions for DD-MM-YYYY, etc...
Hi Marcus Malinow
I tried Alt function also, but is not working. could you provide the solution? Thanks.
See the attached
Hi Marcus Malinow,
I got it. Many thanks.
Hi Karthik,
Did you able to solve, please let us know. Thank you.