Discussion board where members can get started with QlikView.
Hi, i have a date field in the format of DD/MM/YYYY
I am trying to seperate it in the script for day, month, year which i have done by :
Day(Date_Field) as Day,
Month(Date_Field) as Month,
Year(Date_Field) as Year,
But i also want a field for Month-Year but i only want the last 2 digits of the year displayed
so i want..
Jan - 12
Feb - 12
Can anyone help me?
This should do the trick
Date(Date_Field, 'MMM - YY')
So this is what i put in the script?
Date(INVOICE_DATE, 'MMM - YY')AS MonthYear,
I now get multiple entries for each one?
That's probably because there is a time component in the field. Date() simply formats, but the underlying values differ, leading to what seems like duplicates. Use this instead:
Date(Floor(INVOICE_DATE), 'MMM - YY')AS MonthYear,