Code for review advice, is there a hole?
My objective is to create 8 values. These are date values for each quarter of the financial year, 4 start values and 4 finish values(dd/mm/yyyy):
01/07/2005
30/09/2005
01/10/2005
31/12/2005
01/01/2006
31/03/2006
01/04/2006
30/06/2006
To get the starting point : the start date(01/07/????) of the current financial year. If we are presently in the 1st until the 6th months we need to say year(date()-1) to come up with the previous year. Of if we are in the 7th until the 12th months we would say year(date()) because we need the current year - My question is have I missed anything? will I get the correct results no matter what the current month is on the local machine?
IF Month(Date()) <= 7 THEN Adjustment = -1 ELSE Adjustment = 0 END IF
FQStart = CDate("01/07/" & Year(Date())+Adjustment)
SQStart = CDate("01/10/" & Year(Date())+Adjustment)
TQStart = CDate("01/01/" & Year(Date())+Adjustment+1)
FthQStart = CDate("01/04/" & Year(Date())+Adjustment+1)
FQfinish = SQStart - 1
SQfinish = TQStart - 1
TQfinish = FthQStart - 1
FthQfinish ="30/06/" & Year(FthQStart)
TYIA
Wind is your friend
Matt
__________________
Wind is your friend
Matt
|