Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date field converting

Hi,

I have one date field, I would like convert it into Year;Qtr what formula do I need to use either in edit script or edit expression.

ex: 23-01-2009 need it like 2009;Q4

Can anyone guide me pls.

Thanks,

2 Replies
Not applicable
Author

You can try this for year Year(DateField) as Year and that separates the year for you, and Quarter I am not sure, but will let you know if I have one.

Mama

Not applicable
Author

Hello,

Calendar:
LOAD DISTINCT
OrderDate,
Year(OrderDate) as Year,
Month(OrderDate) as Month,
Date(Monthstart(OrderDate), 'MMM-YYYY') as YearMonth,
'Q' & Ceil(Month(OrderDate)/3) as Quarter,
Dual(Year(OrderDate) & '-Q' & Ceil(Month(OrderDate)/3), Year(OrderDate) & Ceil(Month(OrderDate)/3)) as YearQtr,
Week(OrderDate) as Week
RESIDENT OrderHeader;

I Found this above script in one of the Demo apps, please play around with this and you should be able to get what you want...

Mama