Discussion board where members can get started with QlikView.
I'm having a important date field shown as : DD/MM/YYYY HH:MMS.
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 ..
=num(Month([Package End Date]))&' '& Year([Package End Date])
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
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.