kiwiora Posted September 10, 2005 Posted September 10, 2005 Hi guys, I have a database of invoices. What i'm stuck on is I need to create a total of just those invoices that fall in any given financial year. Australian financial year runs from 01/07/year to 31/06/year (e.g 1 July 2004 to 31 June 2005). I think my problem is text -v- date but can't seem to work it out. I have a global field being the entry of the current financial year. so if( CurrentFinancialYear = Invoice Year; Fees; "") But I can't even get InvoiceYear to be calc'd??? The calc of the InvoiceYear is: Case( InvoiceDate ≥ "1/7/2004" and InvoiceDate ≤ "31/6/2005"; "2004"; InvoiceDate ≥ "1/7/2005" and InvoiceDate ≤ "31/6/2006"; "2005"; InvoiceDate ≥ "1/7/2006" and InvoiceDate ≤ "31/6/2007"; "2006"; InvoiceDate ≥ "1/7/2007" and InvoiceDate ≤ "31/6/2008"; "2007"; "2008") Thanks in advance
Søren Dyhr Posted September 10, 2005 Posted September 10, 2005 Hows about: Year ( Date ( Month ( InvoiceDate )+6 ; Day ( InvoiceDate ) ; Year ( InvoiceDate ) ) ) --sd
comment Posted September 10, 2005 Posted September 10, 2005 or: Year ( InvoiceDate ) + ( Month ( InvoiceDate ) > 6 ) Note that "31/6/2005" is not a valid date - June has only 30 days.
IdealData Posted September 10, 2005 Posted September 10, 2005 Year ( InvoiceDate ) - ( Month ( InvoiceDate ) < 7 ) I think.
kiwiora Posted September 10, 2005 Author Posted September 10, 2005 so simple, so brilliant.. thanks guys you rock!!! Year ( InvoiceDate ) - ( Month ( InvoiceDate ) < 7 ) was the winner to get the correct year Note that "31/6/2005" is not a valid date - June has only 30 days. doh.. slip of fingers :
Recommended Posts
This topic is 7112 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now