Adding to Time

  • Thread starter Thread starter Scott
  • Start date Start date
S

Scott

I have a field called "BeginDateTime" that is medium time format. I'm trying
to create a statement that would add 5 minutes for example to my record.

10:02 AM + 5 minutes = 10:07 AM

I tried saying :

Format([BeginDateTime]+5,"Short Time")

but this has no effect. Can someone point to an example?
 
Time is stored as a fraction of a day. Your formula is adding 5 days to the
time, so the time part stays the same! There are 1440 minutes in a day, so
to add 5 minutes add 5/1440.
 
Use the DateAdd function:

Format(DateAdd("n", 5, [BeginDateTime]), "Short Time")

Note that you use n for minutes (m is for months)
 
Back
Top