Last Date of the Month function (1 Viewer)

T

thehallclan

Guest
I searched for this on all of the forums, but I didn't see where it was posted already...

I need a function to return what the last date is for a particular month. It needs to be really efficient (Not a Month - 1 calculation) since I am going to be using it in code that runs through a huge amount of data.

Any help is greatly appreciated...
 
Last edited:

Sohaila Taravati

Registered User.
Local time
Today, 00:51
Joined
Oct 24, 2001
Messages
266
Group your query and choose Last, then sort Descending. Then in the critaria put Like 7/*/*, which will show you the last date in the month of July or however you want to set critaria:)
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 19:51
Joined
Feb 19, 2002
Messages
43,352
The last day of the current month:
DateSerial(Year(Date()), Month(Date()) + 1, 0)

Replace Date() with YourDate to find the last day of a specific month
 

Users who are viewing this thread

Top Bottom