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:

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

Thank you so much

$hours = '40:00:00';

// do this in your controller before passing the $hours value to your template
$hours = substr($hours, 0, 5);
$hours = str_replace(':', '.', $hours);

If these are hours that someone has worked (for example), it might be best to store the hours as a number, and not as a time. I think the time data type is meant more for one specific point in time, e.g. 8:35 in the morning, and not really for counting hours.

Thank you it works…
I used time because it is the sum of attendance.

Thank you