To get the Sunday of the week that just passed, use the following in
VBA:
Public Function GetSunday(keyDate As Date) As Date
GetSunday = DateSerial(Year(keyDate) _
, Month(keyDate) _
, Day(keyDate) - DatePart("w", keyDate) + 1)
End Function
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment