Need help comparing date in query or filter or??????

NateofMT

New Member
Joined
Jul 11, 2002
Messages
13
Hello again. I have a table that I need to pull out name, ticket_number, and date_received from. Then from this table I need to compare today's date against the (date_received) and see if more than 45 days have passed.

If more than 45 days have passed, then this needs to be printed on a report. I assume that I could use a query to do it, but I don't know how to write the formula correctly. I thought I could put date_received + 45 < now() in Criteria, but it does not like it. I have not used filters before, but maybe I need to use them here?

This topic may have been covered elsewhere, so if you want to post me a link, I would be grateful.

Thanks,
Nathan
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Take a look at this piece of SQL:

SELECT Table2.[Date Assessed], DateDiff("d",[Date Assessed],Now()) AS Elapsed
FROM Table2
WHERE (((DateDiff("d",[Date Assessed],Now()))>45));

Replace Table2 and Date Assessed with your own table and field.
 
Upvote 0

Forum statistics

Threads
1,221,713
Messages
6,161,463
Members
451,708
Latest member
PedroMoss2268

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top