home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a012 / 1.ddi / CHAP21.EXE / CHP2116.PRG < prev    next >
Encoding:
Text File  |  1991-04-30  |  503 b   |  22 lines

  1. /*
  2.    Listing: 21.16  Ampm()
  3.    Author: Joe Booth
  4.    Excerpted from "Clipper 5: A Developer's Guide"
  5.    Copyright (c) 1991 M&T Books
  6.                       501 Galveston Drive
  7.                       Redwood City, CA 94063-4728
  8.                       (415) 366-3600
  9. */
  10.  
  11. function Ampm( cTime )
  12. if val(cTime) < 12
  13.    cTime += " am"
  14. elseif val(cTime) = 12
  15.    cTime += " pm"
  16. else
  17.    cTime := str(val(cTime) - 12, 2) + substr(cTime, 3) + " pm"
  18. endif
  19. return cTime
  20.  
  21. // end of file CHP2116.PRG
  22.