Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date Visualisation/Selection

Hi guys,

I'm having a important date field shown as : DD/MM/YYYY HH:MM:SS.

In my visual QlikView file i want to make a lot's of possible date selection : i want to select MONTH and then YEAR, or MONTH - YEAR ...

I try to use sintax Dual(Month(MyDate) & '-' & Date(MyDate, 'YY'), Num(Year(MyDate)) & Num(Month(MyDate), '00')) AS MonthYear but it's not working on my script ..

Any ideeas?

Thanks.

3 Replies
rajni_batra
Specialist
Specialist

=num(Month([Package End Date]))&' '& Year([Package End Date])

whiteline
Master II
Master II

The problem is that dual function takes a NUMBER as a second parameter while you are trying to give it a string.

You should decide what numerical value is suitable for your case.

For example I used MM-YY for text and first day of the month as number.

=Dual(Month(MyDate) & '-' & Date(MyDate, 'YY'),

         MakeDate(Year(MyDate), Month(MyDate))) AS MonthYear

Not applicable
Author

Hi,

The solution that worked for me was to use this sintax in the load script:

Year(Date#(left(DATEFIED,10),'DD/MM/YYYY')) as Date_Year,

Month(Date#(left(DATEFIELD,10),'DD/MM/YYYY')) as Date_Month

Hope that will be useful for you too.

Thanks for your hints.