Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
akpofureenughwu
Creator III
Creator III

CReate Date from a field

Good day friends, I'm working on a job, I need to produce a chart with Month, Quarter and Year data but they were arranged in a table with this format: 20150413 meaning Year 2013 April 13Th. How do I convert format to produce Month, Quarter and Year.

22 Replies
akpofureenughwu
Creator III
Creator III
Author

It didn't work

sunny_talwar

What error did you get?

agni_gold
Specialist III
Specialist III

try your fields like

Date(Date#(Due_Date,'YYYYMMDD'),'DD-MM-YYYY') AS Due_Date,

Month(Date(Date#(Due_Date,'YYYYMMDD'),'DD-MM-YYYY') )  AS Month,

Year(Date(Date#(Due_Date,'YYYYMMDD'),'DD-MM-YYYY') )  AS Year,

Quarter(Date(Date#(Due_Date,'YYYYMMDD'),'DD-MM-YYYY') )  AS Quarter

ajsjoshua
Specialist
Specialist

Hi,

I think field not found error is occuring.

dinuwanbr
Creator III
Creator III

Hi Akpofure,

PFA

Rgds,

Dinu1

Not applicable

Is the format is same across the file, meaning to say, first it is year, then month & last it is date as I can seen in the excel file attached

Regards,

Anand

sunny_talwar

Would you be able to point out where that error would be in the above script? I mean which field is not found?

ajsjoshua
Specialist
Specialist

Hi,

the Field < DueDate > is not found.

sunny_talwar

But I am not even using that in my script here: Re: CReate Date from a field

ajsjoshua
Specialist
Specialist

Hi Sunny,

PFA