Question

Is there a way to convert date.getTime() value to the Date? I mean, like this:

1377564829609 ----> Mon Aug 26 21:53:49 GMT-0300 2013

Thanks in advance.

Was it helpful?

Solution

Try this

var time:Number = 1377564829609;

var date:Date = new Date(time);

The Date class contructor

public function Date(yearOrTimevalue:Object, month:Number, date:Number = 1, hour:Number = 0, minute:Number = 0, second:Number = 0, millisecond:Number = 0)

And the adobe doc said like this

yearOrTimevalue:Object —  If other parameters are specified, this number represents 

a year (such as  1965);  otherwise, it represents a time value. 
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top