Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query: Calculate date/time plus five minutes 1

Status
Not open for further replies.

Bry12345

Programmer
Mar 3, 2002
228
0
0
US
I have an application with several tables. Each table has a date/time field. I need to identify all rows in Tables B, C and D whose date/time fields are within 5 minutes of any date/time field in Table A's records.

My thought was to start with a query containing a calculated field using the date/time field in Table A. I need to calculate Table A's date/time plus 5 minutes. This would give me the relevant beginning and end times for Table A, after which I 'should' be able to identify the relevant rows in the other tables.

Can anyone point me to the proper syntax for constructing a calculated field which will add five minutes to the existing date/time field.

Also, if anyone has any better ideas about how to go about this, suggestions are welcome!

Thanks!

- - - -

Bryan
 
DateTime+5: [DateTime field] + (5/1440)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Pefect! Thank you.

The '5' is obviously the five minutes.

The '1440', I take it, is the number of minutes in the day?

- - - -

Bryan
 
You're right:
1440 = 24 * 60

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top