deharris2003
Programmer
OK I know that it is considered bad form to return more than one value form a function but here goes... I have two functions that seems to be redundant. My goal is to calculate the actual fiscal year start and stop dates. here is my current functions
<%
Public Function FiscalStart()
If Date() < "10/01/" & Year(Date()) Then
FiscalStart = CDate("10/01/" & Year(Date())-1)
Else
FiscalStart = CDate("10/01/" & Year(Date()))
End IF
End Function
Public Function FiscalEnd()
IF Date() < "10/01/" & Year(Date()) Then
FiscalEnd = CDate("09/30/" & Year(Date())-1)
Else
FiscalEnd = CDate("09/30/" & Year(Date()))
End If
End Function
%>
Can this be done in one function or is there a better way to calculate the dates. Any help and sugestions are much appreciated
<%
Public Function FiscalStart()
If Date() < "10/01/" & Year(Date()) Then
FiscalStart = CDate("10/01/" & Year(Date())-1)
Else
FiscalStart = CDate("10/01/" & Year(Date()))
End IF
End Function
Public Function FiscalEnd()
IF Date() < "10/01/" & Year(Date()) Then
FiscalEnd = CDate("09/30/" & Year(Date())-1)
Else
FiscalEnd = CDate("09/30/" & Year(Date()))
End If
End Function
%>
Can this be done in one function or is there a better way to calculate the dates. Any help and sugestions are much appreciated