If you are just interested in displaying the date in MXML, here is
an easy way using a date formatter.

<mx:DateFormatter id="df" formatString="MM/DD/YYYY at L:NN A"/>
<mx:Text text="{df.format(yourDate)}"/>

The text would show something like "05/22/06 at 5:00 AM".  Just add
or remove the different formatString options to meet your needs.

-TH

--- In flexcoders@yahoogroups.com, "yomahz" <[EMAIL PROTECTED]> wrote:
>
> Thanks, that works great.
>
> --- In flexcoders@yahoogroups.com, "Harald Dehn" <harald.dehn@>
wrote:
> >
> > 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:0
> > 0: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
> >
> > Web site design development
> > <http://groups.yahoo.com/gads?
t=ms&k=Web+site+design+development&w1=Web+
> >
site+design+development&w2=Computer+software+development&w3=Software+
des
> >
ign+and+development&w4=Macromedia+flex&w5=Software+development+best+p
rac
> > tice&c=5&s=166&.sig=L-4QTvxB_quFDtMyhrQaHQ> 
> >
> > Computer software development
> > <http://groups.yahoo.com/gads?
t=ms&k=Computer+software+development&w1=We
> >
b+site+design+development&w2=Computer+software+development&w3=Softwar
e+d
> >
esign+and+development&w4=Macromedia+flex&w5=Software+development+best
+pr
> > actice&c=5&s=166&.sig=lvQjSRfQDfWudJSe1lLjHw> 
> >
> > Software design and development
> > <http://groups.yahoo.com/gads?
t=ms&k=Software+design+and+development&w1=
> >
Web+site+design+development&w2=Computer+software+development&w3=Softw
are
> >
+design+and+development&w4=Macromedia+flex&w5=Software+development+be
st+
> > practice&c=5&s=166&.sig=1pMBCdo3DsJbuU9AEmO1oQ> 
> >
> > Macromedia flex
> > <http://groups.yahoo.com/gads?
t=ms&k=Macromedia+flex&w1=Web+site+design+
> >
development&w2=Computer+software+development&w3=Software+design+and+d
eve
> >
lopment&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&
s=1
> > 66&.sig=OO6nPIrz7_EpZI36cYzBjw> 
> >
> > Software development best practice
> > <http://groups.yahoo.com/gads?
t=ms&k=Software+development+best+practice&
> >
w1=Web+site+design+development&w2=Computer+software+development&w3=So
ftw
> >
are+design+and+development&w4=Macromedia+flex&w5=Software+development
+be
> > st+practice&c=5&s=166&.sig=f89quyyulIDsnABLD6IXIw> 
> >
> > 
> >
> > 
> >
> > ________________________________
> >
> > YAHOO! GROUPS LINKS
> >
> > 
> >
> > *      Visit your group "flexcoders
> > <http://groups.yahoo.com/group/flexcoders> " on the web.
> >        
> > *      To unsubscribe from this group, send an email to:
> >       [EMAIL PROTECTED]
> > <mailto:[EMAIL PROTECTED]
subject=Unsubscribe>
> >        
> > *      Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> > Service <http://docs.yahoo.com/info/terms/> .
> >
> > 
> >
> > ________________________________
> >
>







--
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
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to