Link to home
Start Free TrialLog in
Avatar of Greekiwi
Greekiwi

asked on

Adding 2 hours to a value

I have a date/time field called OrderEndTime. How do I add (x) amount of hours/minutes to the value?
Avatar of peakpeak
peakpeak
Flag of Sweden image

Script code examples to build from here:
http://www.outlookcode.com (download Sues Code examples)
http://www.slovaktech.com/code_samples.htm
SOLUTION
Avatar of MNelson831
MNelson831
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Script code examples to build from here:
http://www.outlookcode.com (download Sues code examples)
http://www.slovaktech.com/code_samples.htm
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The Date() function returns the date only. Adding the time to it that way will always give you 2:30 AM.
?Date()+#2:30:00#
04/22/2009 2:30:00 AM 
?NOW()+#2:30:00#
04/22/2009 3:00:40 PM 

Open in new window

Hi jimpen, agreed just using it as a simple exaple.
Cheers, Andrew
Avatar of Greekiwi
Greekiwi

ASKER

Wow, woke up this morning and already had 7 replies. All very helpful. I have given points based on which one I used.