Results 1 to 2 of 2

Thread: Change Display Time Format

  1. #1
    Join Date
    Oct 2011
    Posts
    39
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default Change Display Time Format

    Good day!

    I have Hours field in my database and the datatype is time, I have template that displayed the data of Hours, the data in database is like this 40:00:00 , I want to display the value in my webpage like this 40.00 the 40 is hours and 00 is minutes. Is it possible?How?

    Thank you...

    Here is my code to display the Hours:
    Code:
    <input name= "Hours" class = "LField" type="text" maxlength="12" tabindex="0" size="12"  value="{$Hours}" readonly="readonly" style="background: #e2e2e2"/>
    Thank you so much

  2. #2
    Join Date
    Jul 2010
    Location
    Minnesota
    Posts
    256
    Thanks
    1
    Thanked 21 Times in 21 Posts

    Default

    Check out the strtotime() in php

  3. The Following User Says Thank You to fastsol1 For This Useful Post:

    newphpcoder (10-27-2011)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •