Parsing a formatted date string to a date object


is possible parse date string date object formatted date formatter. don't want write own parser.


var df:dateformatter = new dateformatter();
df.formatstring ="dd.mm.yyyy";
var mycurrentdate:date = new date();
mycurrentdatestring:string = df.format(mycurrentdate); // e.g "17.02.2009"

var mynewdate:date = xxx.xxx(mycurrentdatestring);

some ideas xxx.xxx?

i hope there simple
mynewdate:date = df.parse(mycurrentdatestring);

date.parse() seems parse non-formatted date string.


"cicero111" <webforumsuser@macromedia.com> wrote in message
news:gnee3v$7lq$1@forums.macromedia.com...
> possible parse date string date object
>
> formatted date formatter. don't want write own parser.
>
>
> var df:dateformatter = new dateformatter();
> df.formatstring ="dd.mm.yyyy";
> var mycurrentdate:date = new date();
> mycurrentdatestring:string = df.format(mycurrentdate); // e.g "17.02.2009"
>
> var mynewdate:date = xxx.xxx(mycurrentdatestring);
>
> ideas xxx.xxx?
>
> hope there simple
> mynewdate:date = df.parse(mycurrentdatestring);
>
> date.parse() seems parse non-formatted date string.

i think datefield has function this. may want go through
its api reference in detail.




More discussions in Flex (Read Only)


adobe

Comments

Popular posts from this blog

Qualcuno mi sa dire perchè non va questo protocollo seriale ?

Prezzemolo!

play video