UtterAccess HomeUtterAccess Wiki

Welcome Guest ( Log In | Register )

Custom Search
Edit Discussion
> FiscalStart    


Calculate the date of the first day of a fiscal year.

' FiscalStart
' http://www.utteraccess.com/wiki/FiscalStart
' Code courtesy of UtterAccess Wiki
' Licensed under Creative Commons License
' http://creativecommons.org/licenses/by-sa/3.0/
' You are free to use this code in any application,
' provided this notice is left unchanged.
' rev  date                          brief descripton
' 1.0  2011-10-06                    original release
Public Function fFiscalStart(TheDate As Date, FirstMonth As Byte) As Date
' Procedure: fFiscalStart
' DateTime: 06/10/2011 6:47:21 AM
' Description: returns the first day of fiscal year for the specified date

   Const cstrProcedure = "fFiscalStart"
   On Error GoTo HandleError
   fFiscalStart = DateSerial(year(TheDate) + (month(TheDate) < FirstMonth), FirstMonth, 1)
   Exit Function

   'add custom error handler here
   'ErrorHandle Err, Erl(), cstrModule & "." & cstrProcedure
   Resume HandleExit
End Function

Creative Commons License
FiscalStart by UtterAccess Wiki is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Editing and revision of the content is freely encouraged; for details, see Expected Usage.

Edit Discussion
Custom Search

Thank you for your support!
This page has been accessed 3,745 times.  This page was last modified 16:53, 11 October 2011 by Glenn Lloyd.   Disclaimers