# Date() from mySQL, and format the value in Flash

**URL:** <https://forum.kirupa.com/t/date-from-mysql-and-format-the-value-in-flash/148483>\
**Category:** Uncategorized\
**Created:** [May 20, 2005, 7:15am UTC](https://forum.kirupa.com/t/date-from-mysql-and-format-the-value-in-flash/148483 "2005-05-20T07:15:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fjellaksel](https://avatars.discourse-cdn.com/v4/letter/f/47e85d/32.png) [@fjellaksel](https://forum.kirupa.com/u/fjellaksel)\
**Post date:** [May 20, 2005, 7:15am UTC](https://forum.kirupa.com/t/date-from-mysql-and-format-the-value-in-flash/148483/1 "2005-05-20T07:15:31Z")

</div>

I’m displaying news in a .swf , where the data is retrieved from mySQL db.

I’m using the standard date in mySQL (yyyy-mm-dd) …

and when I retrieve the data from mySQL/php to Flash …  
the textbox displays … yyyy-mm-dd …

But, can anyone tell me how I can format the date to dd.mm ?

here is the code AS code:

myData = new LoadVars()  
myData.load(“[news.php](http://www.bloopers.no/prototype/matches.php)”)  
myData.ref = this

myData.onLoad = function(succes){  
if(succes){  
for(var i=0; i\<this.cant; i++){  
this.ref[“date\_txt”+i].text = this[“date”+i]  
this.ref[“news\_txt”+i].text = this[“news”+i]  
}  
} else trace(“Error loading data”)  
}
