Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Load Month and Year text fields as dates

I would like to load text fields Month and Year into QV in date format to more easily sort them in a chart.

My month field is in long form (January, February, etc) and the year is typical 2017, 2018.

Have been trying to implement the following code in my load script but am receiving no values when I pull my test metric into a straight table with project id.

date(date#([Estimated Completion Month] & ' ' &[Estimated Completion Year] , 'MMYYYY')) as TestMetric

Also tried

date(date#([Estimated Completion Month], 'MM)) as TestMonthMetric

date(date#([Estimated Completion Year] , 'YYYY')) as TestYearMetric

I feel like I am simply misunderstanding how the date function works but could use some insight.

The purpose of this task is to be able to sort a bar chart in correct date order. Was previously loading these fields as a concatenated value [Estimated Completion Month]&' '&[Estimated Completion Year] AS ECD but could not determine a way to order by year and then sort by month.. Will gladly take any tips on this issue as well.

Thank you!

1 Solution

Accepted Solutions
sunny_talwar

May be try this

Date(Date#([Estimated Completion Month] & ' ' &[Estimated Completion Year] , 'MMMM YYYY')) as TestMetric

Read more about dates here:

Why don’t my dates work?

QlikView Date fields

Get the Dates Right

View solution in original post

2 Replies
sunny_talwar

May be try this

Date(Date#([Estimated Completion Month] & ' ' &[Estimated Completion Year] , 'MMMM YYYY')) as TestMetric

Read more about dates here:

Why don’t my dates work?

QlikView Date fields

Get the Dates Right

Not applicable
Author

Thank you for the quick reply! It's working great now!