There are many instances when a fiscal year does not start on 1 Jan. Try the following which allows the user to specify the FY start date.
Code:
Function fGetFYQtr(FYStart As Date, pDate As Date) As Integer
'To call: from debug (immediate window)
'? fGetFYQtr(#7/1/06#, date())
'returns: 3
fGetFYQtr = DateDiff("m", FYStart, pDate) \ 3 + 1
End Function
[FONT="]Public Function Quarter(TheDate As Date) As Variant
'Enter with a date
'Returns the Quarter that date is in
'where July 1 is start of fiscal year
'Change the Choice items for different fiscal year start quarters
Is it possible to apply the same formula to multiple years and Quarters, where there are different years and Quarters? I'm facing a similar problem but I have a column for different years and a column for different quarters, and I need to combine the two to come up with a date.
This MSAccess tutorial explains how to use the Access CDate function with syntax and examples. The Microsoft Access CDate function converts a value to a date.