# Converting milliseconds to hours and minutes

**URL:** <https://forum.kirupa.com/t/converting-milliseconds-to-hours-and-minutes/271920>\
**Category:** Uncategorized\
**Created:** [September 30, 2008, 12:03pm UTC](https://forum.kirupa.com/t/converting-milliseconds-to-hours-and-minutes/271920 "2008-09-30T12:03:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![deluxmilkman](https://avatars.discourse-cdn.com/v4/letter/d/67e7ee/32.png) [@deluxmilkman](https://forum.kirupa.com/u/deluxmilkman)\
**Post date:** [September 30, 2008, 12:03pm UTC](https://forum.kirupa.com/t/converting-milliseconds-to-hours-and-minutes/271920/1 "2008-09-30T12:03:49Z")

</div>

I have 2 Date objects and count down from now to ready,  
and show it in the format of “00 HOURS and 00 MINS.”

```auto

var now:Date = new Date();
var ready:Date = new Date(2008,9,10,12,0,0);

var dif:Number = (ready.valueOf() - now.valueOf());
trace(dif);

```

How can I convert difference to HOUR + MIN?

Please help.

P.S. I`m using A.S. 3.0
