Hi,
i had the same problem…
var dateReg:RegExp
= /^(\d{4})\-(\d{2})\-(\d{2})T(\d{2})\:(\d{2})\:(\d{2})/;
var result:Object
= dateReg.exec(soapDateValue);
return new
Date(Number(result[1]), Number(result[2]) -1,
Number(result[3]),
Number(result[4]),
Number(result[5]),
Number(result[6]));
Von:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von yomahz
Gesendet: Montag, 22. Mai 2006
18:28
An: flexcoders@yahoogroups.com
Betreff: [flexcoders] SOAP
dateTime to ActionScript date conversion
I'm having problems with
Flex2 (b3) properly converting my SOAP
dateTimes to ActionScript dates. The object in the ResultEvent shows
it as a String instead of a Date:
2006-05-22T05:00:00.000Z
The WSDL definition:
<element name="inventoryDate" nillable="true"
type="dateTime"/>
XML generated from the web service:
<ns_inventoryDate:inventoryDate
xmlns:ns_inventoryDate='http://myapp.mycompany.com/jaws'>2006-05-22T05:00:00.000Z</ns_inventoryDate:inventoryDate>
1) Why is flex deserializing this as a String instead of a Date?
2) Is there a data formatter that will let me specify the format of a
string and convert it to a Date? The Date object's String constructor
will not accept the format above. The debugger shows all of the date's
properties as NaN.
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
YAHOO! GROUPS LINKS