A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Date/Time



 
 
Thread Tools Display Modes
  #1  
Old September 13th, 2005, 10:43 PM
Jay
external usenet poster
 
Posts: n/a
Default Date/Time

Table has a field named TIME.
Datatypeate/Time
Format: 09/12/2005 6:24:45 in 24 hour format

Want to have a field, named TIMESUB that substracts TIME by 7 hours using
query.
Example: 09/12/2005 6:24:45 substracted to 09/11/2005 23:24:45

Thank you
  #2  
Old September 13th, 2005, 11:47 PM
Duane Hookom
external usenet poster
 
Posts: n/a
Default

You can use the DateAdd() function to define a column in a query that is 7
hours earlier than an existing datetime value.

--
Duane Hookom
MS Access MVP


"Jay" wrote in message
...
Table has a field named TIME.
Datatypeate/Time
Format: 09/12/2005 6:24:45 in 24 hour format

Want to have a field, named TIMESUB that substracts TIME by 7 hours using
query.
Example: 09/12/2005 6:24:45 substracted to 09/11/2005 23:24:45

Thank you



  #3  
Old September 14th, 2005, 04:21 AM
Van T. Dinh
external usenet poster
 
Posts: n/a
Default

In addition, I would recommend chaging the Field name TIME to something
else.

"Time" is a reserved word for function Time() as well as the Time statement.
Using "TIME" can cause undesirable results if you are not careful when you
do VBA code later.

HTH
Van T. Dinh
MVP (Access)



"Jay" wrote in message
...
Table has a field named TIME.
Datatypeate/Time
Format: 09/12/2005 6:24:45 in 24 hour format

Want to have a field, named TIMESUB that substracts TIME by 7 hours using
query.
Example: 09/12/2005 6:24:45 substracted to 09/11/2005 23:24:45

Thank you



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Date/Time datatype in Access 2003 affects date/time duplicate quer Tim T Running & Setting Up Queries 4 June 27th, 2005 02:20 AM
Date/Time datatype affects date/time query Tim T General Discussion 5 June 26th, 2005 10:46 PM
date/time stamp Jan Worksheet Functions 4 June 19th, 2005 09:51 PM
Date/time range based calculations jim314 General Discussion 1 April 28th, 2005 07:21 PM
calc hours from date/time to date/time Shardon Worksheet Functions 1 November 9th, 2003 11:45 PM


All times are GMT +1. The time now is 04:04 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.