Re: how do I convert a # to time?
Roger Raymond <roger-vp4IRbjYgwNWk0Htik3J/[email protected]>
| Newsgroups | gmane.comp.cms.xaraya.curiosa |
|---|---|
| Organization | Xaraya News Server |
| Message-ID | <[email protected]> |
Probably could use come simple math. Just get the two parts of the
number...
// assuming the format will always be the same
list($hours,minutes) = explode('.',$number);
// convert the decimal minutes dropping any remainder
$minutes = floor(60 / $minutes);
$timeAsText = "$hours'$minutes\"";
Hope that starts you on your way :)
Roger
mulpinBR - 111.898.068 > http://br.xaraya.com wrote:
> I believe it's really easy, but late at night I can't figure it out:
> how could I convert for instance 2.5 to 2'30"?
>
> X's,
> Murilo
>
>
> ---
>
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.509 / Virus Database: 306 - Release Date: 12/08/2003
>
>