# \[FMX\] Convert Decimal Time To Standard Format

**URL:** <https://forum.kirupa.com/t/fmx-convert-decimal-time-to-standard-format/163072>\
**Category:** flash\
**Created:** [September 19, 2005, 3:41pm UTC](https://forum.kirupa.com/t/fmx-convert-decimal-time-to-standard-format/163072 "2005-09-19T15:41:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Davehead](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@Davehead](https://forum.kirupa.com/u/Davehead)\
**Post date:** [September 19, 2005, 3:41pm UTC](https://forum.kirupa.com/t/fmx-convert-decimal-time-to-standard-format/163072/1 "2005-09-19T15:41:20Z")

</div>

hi all,  
I am in a bit of a fix.  
I am trying to do a calculation which will eventually (hopefully) yield the total length of time it will take to download a certain size file over different broadband speeds.

//amount\_total is the total file size (GB)  
//multiplied by 1024 to give me total megabytes  
**mb = Number (amount\_total\*1024)**  
//15 is time (s) to download 1MB  
//Dividing by 3600 gives me a DECIMAL TIME  
**time\_512 = Number ((mb \* 15)/3600)**

So, I am left with a total time of eg: 4.5 hours.  
Now, ideally, i would like a standard number I can use across my movie to convert 4.5 hours to 4hrs 30, or 4.30 for simplicity.  
If I have 0.5 hours as a total, it would be much easier for the user to read it .30 hours.

Is this too confusing ?

D
