Date Time decimal value help please

Joined
Oct 13, 2015
Messages
3
Reaction score
0
Good morning
I am working on a monthly calendar shape that uses appointment shapes as well as other miscellaneous shapes.
I want to have a user select an appointment shape, click on a button to run a macro which will send the appointment
date and time information to an Outlook email notification.

I am stumped on Visio's date/time decimal values from 1899 shown in the shape sheet.

Using the shape sheet decimal value...
Year = shape sheet value divided by 365, add the result to 1899 and I get the year.
How do I get the month of the current year?
How do I get the day of the month the appointment is in?
How do I convert appointment start time and end time to a typical clock value?

I am not necessarily looking for code, just the math to get MM/DD/YYYY and standard clock time for non-Visio people. :)
Example output: October 13th 2015 Start time 9:00am, end time 10:00am

Any help would be great!
Thanks
Tom
 
Joined
Oct 13, 2015
Messages
3
Reaction score
0
I believe I figured out an answer to the above. I discovered the date function DATETIME.
https://msdn.microsoft.com/en-us/library/office/aa212663(v=office.11).aspx
DATETIME(35580.6337)
Returns the value representing 5/30/1997 3:12:32 PM.
This is what I was looking for. Something that converts the decimal value shown in the shape sheet over to a date other users can identify.
Hopefully this will help you if you run into a similar question.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top