Solved

Calculate Fiscal Year 7/1-6/30

Posted on 2009-03-30
4
770 Views
Last Modified: 2013-11-28
I could use assistance with a date serial expression (to be used in an MS Access query) that will calculate a fiscal year 7/1 - 6/30.
0
Comment
Question by:jaguar5554
  • 2
4 Comments
 
LVL 119

Expert Comment

by:Rey Obrero
ID: 24024617
0
 

Author Comment

by:jaguar5554
ID: 24024978
Thank you for the link; however,  I reviewed the MS solution prior to submitting my question on EE's site. I'm looking for an expression that will calculate the fiscal year starting with July 1. I believe the MS site's expression calculates the fiscal year starting with July 15. Perhaps I missed something... Any assistance would be greatly appreciated. Thank you!
0
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 500 total points
ID: 24024988
did you see this part

Option Explicit
Const FMonthStart = 6   ' Numeric value representing the first month
                        ' of the fiscal year.
Const FDayStart = 16    ' Numeric value representing the first day of
                        ' the fiscal year.
Const FYearOffset = -1  ' 0 means the fiscal year starts in the
                        ' current calendar year.
                        ' -1 means the fiscal year starts in the
                        ' previous calendar year.
0
 
LVL 11

Expert Comment

by:mildurait
ID: 24025025
Something like this may return what you want
Note: Dates in 08/09 range would return 2009

Usage in Access Query
SELECT * FROM TABLE where FY(DATECOLUMN)=2009


Public Function FY(ByVal InputDate As Date) As Integer
 

    Dim y As Integer

    y = Year(InputDate)

    If Month(InputDate) >= 7 Then y = y + 1

    FY = y
 

End Function

Open in new window

0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now