B
broncojim
How can I use an IIF statement in a query to return the current fiscal year.
The fiscal year begins in October and end in Spetember.
The fiscal year begins in October and end in Spetember.
John Spencer MVP said:Perhaps
FiscalYear: Year(DateAdd("m",3,[SomeDateField]))
For October 2008 to September 2009 that should return 2009.
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
How can I use an IIF statement in a query to return the current fiscal year.
The fiscal year begins in October and end in Spetember.
Even if your fiscal years are "standard", you would do well to create abroncojim said:How can I use an IIF statement in a query to return the current
fiscal year. The fiscal year begins in October and end in Spetember.
John,
What I am looking to do is to use the fiscal year for the current date to
subtract the fiscal year for the INSTALLDATE field of an asset. So, it looks
like you have given me the second part of the equation. How would I write
the first part so that today, April 2, 2009, returns 2009 for the current
fiscal year, but if I run the query in the future, say October 1, 2009, it
would return 2010 for the current fiscal year?
Thanks,
John Spencer MVP said:Perhaps
FiscalYear: Year(DateAdd("m",3,[SomeDateField]))
For October 2008 to September 2009 that should return 2009.
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
How can I use an IIF statement in a query to return the current fiscal year.
The fiscal year begins in October and end in Spetember.
Bob,
I understand your logic. However, since I am the only Access user at my
work, I would rather have the query calculate the current fiscal year based
on the current date. There will be very few queries performing this
calculation. Is there a formula to return the current fiscal year based on
the current date, possibly involving the Now function?
John,
What I am looking to do is to use the fiscal year for the current
date to subtract the fiscal year for the INSTALLDATE field of an
asset. So, it looks like you have given me the second part of the
equation. How would I write the first part so that today, April 2,
2009, returns 2009 for the current fiscal year, but if I run the
query in the future, say October 1, 2009, it would return 2010 for
the current fiscal year?
Thanks,
John Spencer MVP said:Perhaps
FiscalYear: Year(DateAdd("m",3,[SomeDateField]))
For October 2008 to September 2009 that should return 2009.
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
How can I use an IIF statement in a query to return the current
fiscal year. The fiscal year begins in October and end in Spetember.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.