Using the DateFormatter class

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
[Bindable]
private var today:Date = new Date();
</mx:Script>
<mx:DateFormatter id="DateDisplay" formatString="MMMM D, YYYY" />
<mx:TextArea id="myTA" text="{DateDisplay.format(today)}" />
</mx:Application>
Related examples in the same category