Please enable JavaScript to view this site.

ESL Documentation

Navigation: » No topics above this level «

FAQs_CodeSamples_Q01.inc

Scroll Prev Top Next More

subroutine ConvertTimeAMPM (string: Time) is

 

integer Hours

 

string  AMPM

        HoursString

        MinutesString

 

    extract from Time

        take to ":" HoursString

        skip ":"

        take to ":" MinutesString

 

    copy HoursString to Hours

    if (Hours > 12) then

        copy (Hours - 12) to Hours

        copy Hours to HoursString

        copy " PM" to AMPM

    else

        copy " AM" to AMPM

    end if

    copy HoursString ":" MinutesString AMPM to Time