PHP conversion of time format

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • qasimazam
    New Member
    • Sep 2011
    • 2

    PHP conversion of time format

    hi, can any one told me how to convert time into my own time format. Please give me valid suggestion i already tried very best but failed. .
    e.g i have time like this 17:41:41(H:i:s) so i want to convert into like this 5:41 pm. format is (g:i a).
    i will very thankfull if any one help me.
  • code green
    Recognized Expert Top Contributor
    • Mar 2007
    • 1726

    #2
    Use strtotime() to cast time string to a timestamp,
    then the time can be formatted with date()

    Comment

    • qasimazam
      New Member
      • Sep 2011
      • 2

      #3
      Thanks code green. it is helpful for me.

      Comment

      Working...