This content has been marked as final. Show 4 replies
String.split() is an easy way.
To get the date, split on the space and you have "2008-06-01" as the first value in the array. In the second value, split again on the colon and you get the 13, the 02, and 10.000. Then split again on the period to get 10.
Or you might be able to create a Date object and then use its methods to get the data, but depending on your purpose that may be overly complex.
Thanks guys. I go for split because it is easier.
Below is another way to do it.
var Date_Time:Date = new Date(Date.parse((((" 2008-06-25T16:36:49.534" ).substr(0,19)).replace(/-/g,"/" )).replace(/T/gi," ")));