Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
brunopaulo
Partner - Creator II
Partner - Creator II

Combine Year and Month in 1 Date column

Hello Community,

I'm trying to resolve a date problem. I have the year column and the month column. I want to put it all together into a single column, which is a date type. I'dont want ID type (20141) nor do I want it to be a string. I want it to be recognizable as a date. Can anyone help?

Best Regards

Bruno Paulo

13 Replies
sunny_talwar

Like this

[Main Data]:

LOAD Year,

     Month as NumericMonth,  // it's only numbers jan is 1, fev is 2,

     Month(Date#(Month, 'M')) as Month,

       Values

From qvd file

brunopaulo
Partner - Creator II
Partner - Creator II
Author

[Main Data]:

LOAD Year,

     Month,

     Month(Date#(Month, 'M')) as Month1,

     Date(MakeDate(Year, Month(Date#(Month1, 'MMM')))) as Data,it ap

On year it appears the correct values, on month1 i have jan, fev, etc and on data i have nothing

sunny_talwar

Try this

[Main Data]:

LOAD Year,

     Month,

     Month(Date#(Month, 'M')) as Month1,

     Date(MakeDate(Year, Month)) as Data,it ap

brunopaulo
Partner - Creator II
Partner - Creator II
Author

Sorry for the trouble. Thank you for all the help.

IT SOLVED

Best Regards
Bruno Paulo