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])
 
That was the answer. I tried DateAdd before but must had it switched around. Thank you very much.
 
Back
Top