PDA

View Full Version : Solved: Add Hours to a time



kbsudhir
09-16-2008, 02:35 PM
Hi All,

I am capturing the received date & Time of the incoming mail to my inbox and the same is updated in access.

VBA captures it in the below provided format:

9/16/2008 2:07:52 PM

Now I have to add 48Hrs, 24Hrs, 4Hrs or 2Hrs as the case maybe to the received date & time.

How to go about doing the same.

Thanks
Sudhir

kbsudhir
09-17-2008, 05:11 AM
I got the solution

Its Dateadd function.

ex. dat = dateadd("H",48, "9/16/2008 2:07:52")