Date/Time

G

Guest

Table has a field named TIME.
Datatype:Date/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
 
J

John Vinson

Table has a field named TIME.

That's a reserved word, and WILL cause trouble. I'd strongly suggest
renaming it.
Datatype:Date/Time
Format: 09/12/2005 6:24:45 in 24 hour format

The format is completely irrelevant. What's stored is a Double Float
number, a count of days and fractions of a day since midnight,
December 30, 1899.
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

This field should NOT exist in your Table, if it can always be
derived. Try using a Query, and type

TIMESUB: DateAdd("h", -7, [TIME])

in a vacant Field cell.

John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top