Date Time decimal value help please

Discussion in 'Visio' started by JayEnn, Oct 13, 2015.

  1. JayEnn

    JayEnn

    Joined:
    Oct 13, 2015
    Messages:
    3
    Likes Received:
    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
     
    JayEnn, Oct 13, 2015
    #1
    1. Advertisements

  2. JayEnn

    JayEnn

    Joined:
    Oct 13, 2015
    Messages:
    3
    Likes Received:
    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.
     
    JayEnn, Oct 19, 2015
    #2
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. marco_aas
    Replies:
    0
    Views:
    3,546
    marco_aas
    Jul 17, 2011
  2. Dean Letsema
    Replies:
    0
    Views:
    185
    Dean Letsema
    Feb 8, 2016
Loading...