PDA

View Full Version : Change Display Time Format



newphpcoder
10-26-2011, 06:08 AM
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:


<input name= "Hours" class = "LField" type="text" maxlength="12" tabindex="0" size="12" value="{$Hours}" readonly="readonly" style="background: #e2e2e2"/>


Thank you so much

fastsol1
10-26-2011, 01:50 PM
Check out the strtotime() in php