Time Addition

G

Gary Dolliver

Hi all,
Is it possible to have a time field in mm/dd/yy hh:mm:ss format, and add
time to it, if the time is in an hour format? I have tried using DateAdd,
but am unsure how to do hours, minutes and seconds
For example, I have the date of 01/01/08 08:00:00 AM and I would like to add
6.92 hours to it. Would I need to calulcate the minutes and seconds from the
..92 first (55 minutes and 12 seconds) or is there a way I can add 6.92 hours
and have the end result be : 01/01/08 02:55:12 PM
Help is always appreciated, thanks!
-gary
 
M

Marshall Barton

Gary said:
Is it possible to have a time field in mm/dd/yy hh:mm:ss format, and add
time to it, if the time is in an hour format? I have tried using DateAdd,
but am unsure how to do hours, minutes and seconds
For example, I have the date of 01/01/08 08:00:00 AM and I would like to add
6.92 hours to it. Would I need to calulcate the minutes and seconds from the
.92 first (55 minutes and 12 seconds) or is there a way I can add 6.92 hours
and have the end result be : 01/01/08 02:55:12 PM

DateAdd("s", 6.92 * 3600, date)
 

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


Top