Solved

Calculate Fiscal Year 7/1-6/30

Posted on 2009-03-30
4
782 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 120

Expert Comment

by:Rey Obrero (Capricorn1)
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 120

Accepted Solution

by:
Rey Obrero (Capricorn1) 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

740 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