Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a QVD stored with a date field having format as DD/MM/YYYY, now when i try to extract the day and year, i am able to do it correctly but not able to extract the month field. please see the below details and advice or guide me if i am doing anything wrong.
date(date#(dates,'yyyymmdd'),'dd/mm/yyyy') as date
2. I am trying to extract the year, month and day from the date filed using below statements
Now Please see the below screenshot of the result

please help me resolve this issue. Thanks in advance.
HI,
Please post your sample data
Sasi, thanks for replying. By posting sample data , you mean my sample QVW?
Yes, if possible qvw or else excel file containing raw date field.
Sasi, please find the attached excel file with all the date data.
HI, I need raw data, please share your QVW,

Its Working
When you have the date in DD/MM/YYYY in .qvd, why is it needed to use an expression again to convert it into 'DD/MM/YYYY' format? And if " date(date#(dates,'yyyymmdd'),'dd/mm/yyyy') " is exactly what you are using, "mm" returns minutes not months.
Please share your .qvd or .qvw for us to get the exact situation.
Try This,
load *,
date#(date,'DD-MM-YYYY') as Date1;
Data:
LOAD date
FROM
(biff, embedded labels, table is Sheet1$);
load
subfield(Date1,'/' ,1) as Day,
subfield(Date1,'/' ,2) as month,
subfield(Date1,'/' ,3) as Yearr
Resident Data;
Output:
Its Just a Time Being Solution,But I think there is Some Formatting issue in your Excel ,Regarding the date field format is not correct,Please Check it once.
Thank's & Regards,
Sumit Jadhav.
try this
Month(date#(dates,'yyyymmdd') as date