Parsing a Date as a String in Flex

March 16th, 2007

The DateField object in ActionScript has a static method called which:

“Parses a String object that contains a date, and returns a Date object corresponding to the String. The inputFormat argument contains the pattern in which the valueString String is formatted. It can contain “M”,”D”,”Y”, and delimiter and punctuation characters. The function does not check for the validity of the Date object. If the value of the date, month, or year is NaN, this method returns null.”

1
2
 
DateField.stringToDate(the_date_field.text, "MM/DD/YYYY")

Categories: Flex

Leave a comment

Leave a comment

Feed

http://blog.jeffdouglas.com / Parsing a Date as a String in Flex

WordPress Appliance - Powered by TurnKey Linux