4 Replies Latest reply on Jan 13, 2017 6:06 AM by Tiffany Muskopf

    CONVERT STRING TO TIME FORMAT - NEED HELP

    Tiffany Muskopf

      HELLO ALL,

       

      I was wondering if someone can help me solve a  problem.  My string format has no space between the the number part and the PM/AM part.  I was given a solution, but it poses problem again with the 12:xx am/pm appointment times.  Here is a screen shot of the problem.  You can compare appt time with appt time 2 and see the differences at the bottom.

       

       

      The solution was appt time 2, but as you see it does not convert the am to am, and pm to pm.  Here is the calculation that was given to me.  Is there anyway you can help or know the answer to my problem?

       

      MAKETIME(IIF(RIGHT([Appt Time],2)="PM",12,0)+INT(LEFT([Appt Time],2)),INT(MID([Appt Time],4,2)),0)