# Formatting output date in dateField

**URL:** <https://forum.kirupa.com/t/formatting-output-date-in-datefield/296004>\
**Category:** flash\
**Created:** [September 8, 2009, 4:20pm UTC](https://forum.kirupa.com/t/formatting-output-date-in-datefield/296004 "2009-09-08T16:20:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vascoraf](https://avatars.discourse-cdn.com/v4/letter/v/c67d28/32.png) [@vascoraf](https://forum.kirupa.com/u/vascoraf)\
**Post date:** [September 8, 2009, 4:20pm UTC](https://forum.kirupa.com/t/formatting-output-date-in-datefield/296004/1 "2009-09-08T16:20:19Z")

</div>

Im trying to format the date format that is sent from Flash as a variable to php.

This is the code:

```php
var nomeMeses:Array = new Array("Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro");
var calendarioC:Date = new Date(form.chegada_mc.selectedDate);
var dataPersonalizadaC:String = calendarioC.getDate()+" de "+nomeMeses[calendarioC.getMonth()]+" de "+calendarioC.getFullYear();

LoadVars.chegada = dataPersonalizadaC;

```

The problem is that it format and send the “today” date when it should send the selectedDate in the DateField component.
