There's only one thing really wrong with the original code:
Quote:
Originally Posted by pilsnermonkey
|
This sets the date to the last day of the previous month (why you were getting December instead of January) - to set to the last day of the current month you'd need to add 1 to the month as well.