flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hemadri Seelamsetty <hemadri.i...@gmail.com>
Subject Re: Simple way to parse I18N dates?
Date Sat, 01 Feb 2014 16:49:19 GMT

You can also use the static methods of mx.controls.DateField Class.

Below are the signatures of the static methods

DateField.dateToString(value:Date, outputFormat:String):String
DateField.stringToDate(valueString:String, inputFormat:String):Date

Example: var dob:Date = DateField.stringToDate("02/01/2014", "MM/DD/YYYY");

It can contain "M","D","Y", and delimiter and punctuation characters

Hemadri <http://hemadri.com>

On Sat, Feb 1, 2014 at 7:17 PM, Christofer Dutz

> Hi,
> I am currently sort of stuck with implementing some functionality.
> I know I can use a DateFormatter to define a formatted string from a given
> date, but I couldn't actually find something for the other way around.
> The Java equivalent usually has a "parse" and a "format" method allowing
> to read a date from a string and to return a date and a format to serialize
> a date to a desired output format. It seems the Flex version is missing the
> parse part ... What do I have to use for this?
> Chris

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message