Discussion Board for collaboration on QlikView Scripting.
i have a data called dates, and i only need to get the month and year.
and a friend of mine told me to use 'Floor' , 'MonthStart' , 'Date' to extract Month and Year. how can i use these functions in my codes
Go to Solution.
if your date is 2013 April 14 then:
your monthyear field will be
year(mydate)*100 + month(mydate)
so 2013*100 = 201300 + 4 => 201304
hope it helps
you can do:
num(Month(yourdate),00) & Year(yourdate,4) as MonthYear
what i did is date(myDate, 'MMM-YYYY')
Formatting it using Date(myDate, 'MMM-YYY') is the right approach but it only solves half of the problem. It only hides the day part. It does not remove it. If you want to do it properly, you should use a MonthStart() first, i.e.
Thank you sir! it does solve my problem