Calculate short time

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a field that is formatted as Short Time. It stores just the time"12:00". In a query I would like to add 1 hour to that time in certain instanses but when I do that it does not change the time. It changes the year if the field is not formatted as Short Time and when it is formatted as Short Time it does nothing.
 
I have a field that is formatted as Short Time. It stores just the time"12:00". In a query I would like to add 1 hour to that time in certain instanses but when I do that it does not change the time. It changes the year if the field is not formatted as Short Time and when it is formatted as Short Time it does nothing.

Regardless of the format of a Date/Time field, it's always stored as a
double Float number, a count of days and fractions of a day since
midnight, December 30, 1899. The format merely controls how this value
is *displayed*.

How are you adding one hour? The preferred method would be

DateAdd("h", 1, [fieldname])
 
Take a look at the DateAdd function.

DateAdd("h",1,YourField)
 
That was the answer. I tried DateAdd before but must had it switched around. Thank you very much.
 

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

Similar Threads

query comes up blank 1
Calculate time difference 3
Time calculation 2
Time difference 5
short date, short time 2
date/time field 1
Access DateDiff function 0
Working Time calculation - from text to short time 2

Back
Top