Converting a String into a Date object in Flex

Ramesh picture Ramesh · Sep 25, 2012 · Viewed 10.5k times · Source

Possible Duplicate:
Date to String <-> String to Date

I have a date in String form:

"Tue Sep 25 12:24:18 GMT+0530 2012"

How can I convert this String into a Date object?

Answer

Timofei Davydik picture Timofei Davydik · Sep 25, 2012
var d:Date = new Date();
d.setTime(Date.parse(str));