And this function will give you the answer based on a yy-q input:
' ***************** Start Code *******************
Public Function GetMidSeasonDate(strQuarter As String) As Date
Dim dteStartDate As Date
Dim dteEndDate As Date
Select Case Right(strQuarter, 1)
Case "1"
dteStartDate = DateSerial(CInt(Left(strQuarter, 2)), 1, 1)
dteEndDate = DateSerial(CInt(Left(strQuarter, 2)), 3, 31)
Case "2"
dteStartDate = DateSerial(CInt(Left(strQuarter, 2)), 4, 1)
dteEndDate = DateSerial(CInt(Left(strQuarter, 2)), 6, 30)
Case "3"
dteStartDate = DateSerial(CInt(Left(strQuarter, 2)), 7, 1)
dteEndDate = DateSerial(CInt(Left(strQuarter, 2)), 9, 30)
Case "4"
dteStartDate = DateSerial(CInt(Left(strQuarter, 2)), 10, 1)
dteEndDate = DateSerial(CInt(Left(strQuarter, 2)), 12, 31)
End Select
GetMidSeasonDate = DateAdd("d", DateDiff("d", dteStartDate, dteEndDate) / 2, dteStartDate)
End Function
' ***************** End Code *********************
****************************
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)
Robert L. Johnson III
MCSA, CNA, Net+, A+
w: rljohnso@stewart.com
h: wildmage@tampabay.rr.com