Is there a simple way to add hours to a specific time in access

C

Colin DIxon

In access, I recors the specific time the record is created. I want to add
hours on to give me the time to be completed by .e.g Specific time 12:00, add
4 hours, time to complete the job 16:00.

Can I simply add the hours in the expression builder to give me this field
which would be "time + 4 hours"

Thanks

Colin
 
R

Rick Brandt

Colin said:
In access, I recors the specific time the record is created. I want
to add hours on to give me the time to be completed by .e.g Specific
time 12:00, add 4 hours, time to complete the job 16:00.

Can I simply add the hours in the expression builder to give me this
field which would be "time + 4 hours"

Thanks

Colin

Check help file for DateAdd() function.
 
6

'69 Camaro

Hi, Colin.
I want to add
hours on to give me the time to be completed by .e.g Specific time 12:00, add
4 hours, time to complete the job 16:00.

You can use the DateAdd( ) and TimeValue( ) functions to display the time of
day. For example:

TimeValue(DateAdd("h", 4, SomeDate))

.... where SomeDate is a Date/Time field.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address so that a message will
be forwarded to me.)
- - -
If my answer has helped you, please sign in and answer yes to the question
"Did this post answer your question?" at the bottom of the message, which
adds your question and the answers to the database of answers. Remember that
questions answered the quickest are often from those who have a history of
rewarding the contributors who have taken the time to answer questions
correctly.
 
J

Jens P

Hi Colin

Don't know if you found your answer yet, here is my suggestion, in the
default value field either in form or table simply use the "=now()" function
which will enter the time the record was created you can also enter "=now() +
0.05" or whatever. You need to calculate how many hours you want to add, "1"
is one day.

Jens
 
Top