Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have field date in format dd/mm/yyyy; I have date from 01/05/2004 to 30/04/2009 in records; The function Year(date) give me the year value; My problems is my Acadamic year starts from May2004 to April2005; May2005 to April2006 likewise..... How I can have AYear(Acadmicyear), 2004,2005... by selecting the date with above criteria. I am New to qlikview. Thanks
Hi,
You are saying abt finianacial year rite...?
In that case you should go for yearname() function.
= Yearname(Fieldname,0,5) as Financial_Year
- Sridhar
Hi,
You will need to creat an alias for that in this way
Load Year(addmonths (DateField,-3)) as financialYear Resident RequiredTable;
The simplest logic for this is that for financial year 2009 the date values are Apr 2009 to Mar 2010 , so to get the proper financial year deduct 3 month's from the datefield & use if with a different alias. Likewise you can use it for your requirement.
See if it helps.
Regards
Amar
IF (NUM(MONTH(ENROLLDATE) ) <5, (YEAR(ENROLLDATE)-1, YEAR(ENROLLDATE)) AS ACDAMICYEAR,
GIVES ACDAMICYEAR FROM MAY 2007 TO APRIL 2008
HAPPY SHARING