SOLVED

Date Filter

Steel Contributor

Experts, how would I display records only if the count between current date and [FundingDate] is <=3?  So, if today was 1/23/23 and the [FundingDate] was 1/27 then I wouldnt show it since it the day count is 4. If today is 1/24/23 then I would show it since the count is 3. 

 

SELECT tblDocs.*, tblDraws.FundingDate
FROM tblDraws INNER JOIN tblDocs ON tblDraws.DrawNo = tblDocs.DrawNo;

 

thank you

Tony2021_0-1674587617517.png

 

3 Replies
When you say "Day Count" is it correct to assume that you mean "Number of Days", not count of something else by day?
best response confirmed by Tony2021 (Steel Contributor)
Solution

Hi,

 

SELECT tblDocs.*, tblDraws.FundingDate
FROM tblDraws INNER JOIN tblDocs ON tblDraws.DrawNo = tblDocs.DrawNo

WHERE [FundingDate]-Date()<=3

 

Servus
Karl
****************
Access Bug Trackers
Access News
Access DevCon

thank you Karl.

George, yes it is the number of days.
1 best response

Accepted Solutions
best response confirmed by Tony2021 (Steel Contributor)
Solution

Hi,

 

SELECT tblDocs.*, tblDraws.FundingDate
FROM tblDraws INNER JOIN tblDocs ON tblDraws.DrawNo = tblDocs.DrawNo

WHERE [FundingDate]-Date()<=3

 

Servus
Karl
****************
Access Bug Trackers
Access News
Access DevCon

View solution in original post