var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Month end
I am trying to determine the last day of a month based on the first day of the month. I am also trying to calculate the number of days left in the month from a given date to the end of the month. I need to do this in a query as opposed to in code.
Best way to do it is to use the DateAdd function to subtract one day from the first day of the NEXT month.
No time to test, but it's something like:
LastDay: DateAdd("d", -1, DateSerial(1, Month(DateAdd("m",+1,[DateField])), Year(DateAdd("m",+1,[DateField])))
Something like that anyway ^^
This question has recently been asked and answered too, so you might want to try searching through the topics here to confirm
Owner and Manager of
. , Microsoft Access Development Specialists CypherBYTE
Microsoft Access . MCP
And all around nice guy! "Heck it's something understood by accountants ... so it can't be 'that' difficult..."
"...teach a man to code and he'll be frustrated for life! "