Documentation

CCourse::TimeToStr

string
CCourse::TimeToStr(
 int seconds
);

The TimeToStr method takes seconds and converts the value into a date string containing days, hours, minutes and seconds.

Parameters

ParameterDescription
seconds The number of seconds.

Return Values

The method returns a string in form of DD.HH.MM.SS.

Example


<?

if (CModule::IncludeModule("learning"))
{
    $seconds = 56789;
    $time = CCourse::TimeToStr($seconds);
    echo $time; //print 15 hr. 46 min. 29 sec.
}
?>
© «Bitrix24», 2001-2024