Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding minutes to a time value

Status
Not open for further replies.

load3d

Programmer
Feb 27, 2008
117
US

I have a field that holds a value called

Me.AppointmentTime

We'll say the user chose "9:00:00 AM" as the appointment time.


I want to take the me.appointmentTime value and add 5 minutes to it and set the value of another field to that value.


Me.time1 = me.appoitnmentTime + 5 minutes

me.time1 would then equal 9:05:00 AM

How do I make this happen?

 



TIME is store as DAYS

THEREFORE, Convert minutes to days
Code:
Me.time1 = TimeValue(me.appoitnmentTime) + 5/24/60


Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Me.time1 = DateAdd("n", 5, Me.AppoitnmentTime)

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks everyone! This helped me out a lot.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top