View Full Version : Converting String into Date
01-23-2006, 04:21 PM
Does anyone have any idea how to take a string that has a date in it and convert it into time with ActionScript. Here is an example of the string for today: "January 23, 2006 5:11:00 AM PST". This will change everyday and is being passed into my flash movie as a parameter but I donít know how to get Flash to recognize it.
Thanks in advance if anyone can help.
01-23-2006, 05:33 PM
hy, can you tell a bit more 'bout your problem. Why do you need to get the date from outside flash?what are you going to do with that date inside flash? how are you going to treat it?
01-23-2006, 06:13 PM
03-04-2006, 02:58 PM
I too am looking for an answer to this.
If I take my string, and simply assign it to a variable of type Date, all date functions return undefined. For example:
myDate = "January 23, 2006 5:11:00 AM PST";
The trace will show "undefined". In other words, flash does NOT correctly convert a string which contains a valid date into a date object.
So, the question again is, how do you TRULY convert a string into a date object?
vBulletin® v3.8.5, Copyright ©2000-2014, Jelsoft Enterprises Ltd.