private function initApp():void{ var myDate:Date = new Date(); var myDateFormater:DateFormatter = new DateFormatter(); myDateFormater.formatString="MMDDYYYY"; var myFormatedDate:String = myDateFormater.format(myDate); trace(myFormatedDate); }
----- Original Message ---- From: JRBower <[EMAIL PROTECTED]> To: flexcoders@yahoogroups.com Sent: Wednesday, February 6, 2008 10:22:58 PM Subject: [flexcoders] Date variable I'm trying to create a date variable that returns the date as 02062008. (mmddyyyy) In ColdFusion I can do it like this LSDateFormat( Now(),'MMDDYY' ). When I try: var myDate:Date = new Date(); myDate = myDate.formatString (mmddyyyy) ; but no joy... -- View this message in context: http://www.nabble. com/Date- variable- tp15327188p15327 188.html Sent from the FlexCoders mailing list archive at Nabble.com. ____________________________________________________________________________________ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs