Share via

is this possible

Anonymous
2024-09-26T09:42:43+00:00

hi, i have a field that is automatically update with a date and time field

i want to run a query that will only bring back data in a query that was called more than 8 hours earlier

is there a way to do this please

Microsoft 365 and Office | Access | For education | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2024-09-26T11:09:31+00:00

If you are date/time stamping rows in a table then you can return those rows where the date/time stamp is before the 8 hours ago by means of a query like this:

SELECT *

FROM Contacts

WHERE DateTimeStamp < NOW()-#08:00:00#;

This uses a table from my ChangedRecordDemo database, which you'll find as a zip file in in my public databases folder at:

https://1drv.ms/f/c/44cc60d7fea42912/EhIppP7XYMwggESpAAAAAAABaDKZCllSuweYBPJ5zKa3cg

This little demo file illustrates the use of functions for determining whether data has actually changed, rather than merely having been updated, and includes examples for date/time stamping or logging records when data has changed.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

0 additional answers

Sort by: Most helpful