Solved

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

Posted on 2011-03-11
4
564 Views
Last Modified: 2013-11-27
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
Comment
Question by:AronMcD
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 14

Accepted Solution

by:
pteranodon72 earned 500 total points
ID: 35109814
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
 

Author Comment

by:AronMcD
ID: 35109855
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
 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 35110099
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
 

Author Comment

by:AronMcD
ID: 35110614
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 HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question