Specific date query

mounty76

Registered User.
Local time
Today, 11:42
Joined
Sep 14, 2017
Messages
350
Hi All,

I'm trying to write a query that returns the below:

Between (24th of the last month) And (27th of the current month)

Is straight forward for the first and last days of the month but am struggling with the specific dates?

Any help much appreciated!

Cheers
 
Sorry folks, managed to figure it out

Between DateSerial(Year(Date()),Month(Date())-1,24) And DateSerial(Year(Date()),Month(Date()),27)
 
Perhaps mark it solved then?
 
Would that solution have worked a week ago? Need to use DateAdd to future proof it.
 
Would that solution have worked a week ago? Need to use DateAdd to future proof it.

Looks like yes:

?DateSerial(Year(#1/26/22#),Month(#1/26/22#)-1,24)
12/24/2021
 
Apologies. It does work without having to manually account for the year change backwards.
 

Users who are viewing this thread

Back
Top Bottom