1 hour meeting time

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to set up the end time for an appointment as 1 hr more to have 1
hr meeting (not 30 min as a default).
.Start = dtStartDate & " " & dtStartTime ' it's working
dtEndTime = dtEndTime + 1
.End = dtStartDate & " " & dtEndTime ' error
Could anybody help me how to do it?

Thanks
 
Why are you using strings instead of datetime? if dtEndTime is "10:30pm",
dtEndTime + 1
will be a "10:30pm1" srting, which makes no sense.
Also, adding 1 to a datetime variable adds 24 hours. One hour is 1/24.
Try
..End = .Start + 1/24

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
This is where Date functions come in handy:

objAppt.End = DateAdd("h", 1, objAppt.Start)
 
Back
Top