Re: how do I convert a # to time?
"mulpinBR - 111.898.068 > http://br.xaraya.com" <xaraya-ZJ5JVcqp1wkXtBFVwdE/[email protected]>
| Newsgroups | gmane.comp.cms.xaraya.curiosa |
|---|---|
| Organization | Xaraya News Server |
| Message-ID | <[email protected]> |
actually it shouldn't have that /10 X's, Murilo "Roger Raymond" <roger-vp4IRbjYgwNWk0Htik3J/[email protected]> escreveu na mensagem news:[email protected] | Bah! that math is totally wrong!!! sorry | | Should be. | | // convert the decimal minutes dropping any remainder | $minutes = floor(60*($minutes/10)); | | | Roger Raymond wrote: | > 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 | >> | >> | > | --- Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.510 / Virus Database: 307 - Release Date: 14/08/2003