by MYLE
21. June 2010 21:23
I had to Find the Last day on the Month that the hard bit but got thinking why note just find the first day on the next month then -1 day form that so here it is
Function st1month(Tdate)
st1month = DateSerial(Year(Tdate), Month(Tdate) + 1, 1)
End Function
OK now let find the Last day on month
Function LastDay(Tdate)
Lastd = dateadd("m",1,st1month(Tdate))
LastDay = DateAdd("d", -1, Lastd)
End Function
Must have both function in your code.
8959c389-2c45-470d-8961-4b0b588a1b98|0|.0
Category: MSaccess, VB, Dislexia
Tags: