Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
Can anyone help me in getting the year?
I tried the below script but it not working ...
ABC:
LOAD Date#(Date)as Date,,
Year(Date#(Date)) as year,
Name,
Product,
Sales FROM CORE_DUP\123.txt (txt, codepage is 1252, embedded labels, delimiter is '\t', msq);
Have you tried with the correct date format?
SET DateFormat = 'M/D/YYYY';
ABC:
LOAD Date#(Date) as Date,
Year(Date#(Date)) as year,
Name,
Product,
Sales FROM CORE_DUP\123.txt (txt, codepage is 1252, embedded labels, delimiter is '\t', msq);
Thanks Stefan,
Hi,
try like
date(date#(Date,'M/D/YYYY'))
Regards,
Hi,
If you tried the above script then you need to remove double "," from your script
As per your script itself you can able to get the year.
Please find the below script(Removed only the ,)
ABC:
LOAD Date#(Date)as Date,
Year(Date#(Date)) as year,
Name,
Product,
Sales
FROM
[123.txt]
(txt, codepage is 1252, embedded labels, delimiter is '\t', msq);
Hi Try like this
LOAD
Date(Date#(Date,'MM/DD/YYYY'),'DD/MM/YYYY') as Date1,
Name,
Product,
Sales
FROM
(txt, codepage is 1252, embedded labels, delimiter is '\t', msq);
Regards