Thread: Am/pm

  1. #1
    Registered User
    Join Date
    Oct 2001
    Posts
    16

    Am/pm

    how do you display the AM/PM on the end of a time display?
    eg (11:10 to 11:10 AM)

  2. #2
    of Zen Hall zen's Avatar
    Join Date
    Aug 2001
    Posts
    1,007
    The code from the previous thread will give you hours in the 24 hour clock format, so you need to test the value contained in the tm_hour variable and append AM/PM depending on the value and minus 12 if it's PM.
    zen

Popular pages Recent additions subscribe to a feed
Website Security Test