Hi,
This is something I was looking for a few hours and found it
here
4guysfromrolla site is really helpful but I think this function should be in FAQ as well.
To get the last day of the month their routine found the last day of the last month.
To find the last day of the current month instead of last month, just add 1 to the month portion:
DateSerial(Year(CurrentDate), Month(CurrentDate) + 1, 1 - 1)
As was explained on the site, you can similarly find out what the last day of a month 2 years ago, by subtracting - 2 for the year part:
DateSerial(Year(CurrentDate) - 2, Month(CurrentDate) + 1, 1 - 1)
Hope this helps out. But visit
4GuysFromRolla for more articles on various other things.
.intrino.