I apologize in advance if this is covered in another thread, I looked but did not find anything that answered my question.
I have a fleet of vehicles that are owner-operated. To properly allocate thier fuel and determine forecasting I have to take the total days of thier lease time (thats the easy part!) and then break it down in Fiscal Year quarters.
The fiscal year starts Oct 1 of the previous year and ends Sep 30th of the current year. For example, we are currently in FY14 which started Oct 1st, 2013 and will end Sep 30th, 2014. Naturally, each quarter is 3 months long...
This issue: I have a unit that will be operating in my area Aug 18th, 2014 to Feb 14th, 2015. 180 days total with a portion of those days (137) in FY15. I need a query that will show the number of operating days for each quarter. I could do a constants table and do explicit date math for each quarter, but I am looking for something a bit more dynamic. I have over 50 units with stagered dates and something a little for plug and play would be ideal...
Thanks in advance...