Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join “Do More With Qlik” with Mike Tarallo to get a first-hand look at the New Authoring Experience, June 29th: REGISTER HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Working with the date YYYY-MM-DD, YYYY ,MM

Hello, I am a new user of QlikView and it's a pleasure join this community.

Working with a field date YYYY-MM-DD I am not able to have a list box with a only row for YYYY and only 12 rows for MM. The only script that I used is the following:

But the script gives me back the following result:

Is there someone who can help me?

Thanks a lot!

1 Solution

Accepted Solutions
Clever_Anjos
Employee
Employee

use proper functions

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

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

View solution in original post

7 Replies
Clever_Anjos
Employee
Employee

use proper functions

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

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

Not applicable
Author

Hi Anjos,

nice to meet you, the solution is perfect.

Thank you so much for your precious support!

Best, Flavio.

kashaboinaraj
Creator
Creator

Hi

Year(Date#(EVENT_DATE,'YYYY-MM-DD')) as Year,

Month(Date#(EVENT_DATE,'YYYY-MM-DD')) as Month

Regards

vishnu

sunny_talwar

One alternative to not having to repeat Date#(EVENT_DATE,'YYYY-MM-DD') would be to use preceding load like this:

LOAD *,

          Year(EVENT_DATE) as Year,

          Month(EVENT_DATE) as Month;

LOAD allyourfields,

          Date#(EVENT_DATE,'YYYY-MM-DD') as EVENT_DATE

Not applicable
Author

Hi, thanks for your support!

Currently I am working with a date YYYY-MM, but adapting the formula suggested, it doesn't work! Can I have your advice?

Thanks a lot!

Flavio.

kashaboinaraj
Creator
Creator

Hi Flavio

Please try this

sum(Date#(num(DD-MM-YYYY))

Regards

vishnu

edouard_chandav
Contributor II
Contributor II

Working on the sample Thanks a lot. I check on my real model and I close the thread.

Thanks again