Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 575
  • Last Modified:

VBA adding appointment to Outlook calendar subtracting 1 day from end date

I'm not sure if I can still ask a question here of if I'm supposed to start a new thread...sorry I'm a newbie.  

The problem I'm having is when the vacation request is for multiple days...say 3/2/2011 to 3/7/2011.  It goes into the calendar but subtracts a day from the end date.  So in the calendar it shows the vaca as 3/2/2011 to 3/6/2011.  Is there a correct way to fix this?  
0
AronMcD
Asked:
AronMcD
  • 2
1 Solution
 
pteranodon72Commented:
You don't show any code, so we are in the dark. My shot in the dark is:

If you specify only a date value, the time is assumed to be midnight. So, a vacation from midnight 3/2/2011 to midnight 3/7/2011 would mean that 3/7/2011 8:00 AM should be post-vacation. Add one day to the end date to move the end to midnight of the day of return.

Hope this helps,
pT72
0
 
AronMcDAuthor Commented:
Thanks pteranodon72.  I kind of figured that may be whats happening.  I can't just add a day to the end date as there are sometimes vacation requests for just one day ie: Start Date - 3/2/2011 to End Date - 3/2/2011.  Will have to do a check before adding the day?  If so, how would be the best way to do so?  Or is there another way?

Thanks again.
0
 
Chris BottomleyCommented:
Can you give some examples as to what you have in your Db for me.startdate and me.enddate,  i.e for 1 and multiple day entries?

Chris
0
 
AronMcDAuthor Commented:
I ended up doing a check on the start date and end date.  If the end date was different than the start date I added a day.  Seems to work fine.

Thanks guys for the help.  
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now