# Saving/Loading DateTime from Flash \> MySql

**URL:** <https://forum.kirupa.com/t/saving-loading-datetime-from-flash-mysql/330806>\
**Category:** flash\
**Created:** [March 19, 2013, 5:44am UTC](https://forum.kirupa.com/t/saving-loading-datetime-from-flash-mysql/330806 "2013-03-19T05:44:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gamedesigner](https://avatars.discourse-cdn.com/v4/letter/g/e47774/32.png) [@gamedesigner](https://forum.kirupa.com/u/gamedesigner)\
**Post date:** [March 19, 2013, 5:44am UTC](https://forum.kirupa.com/t/saving-loading-datetime-from-flash-mysql/330806/1 "2013-03-19T05:44:11Z")

</div>

How would I go about saving a timestamp to mySql from flash? Would I use a string or a number? Does this date number “1363671088331” save properly into the mySql “date” data type? I only need second accuracy, but ms would be nice. [indent]-[/indent] Also, is it somehow possible to synchronize flash with the server timestamp? My idea would be just to create my own date variable from one send from amfPhp\>Flash and increment it in flash manually based upon the clients time change when it’s requested. [indent]-[/indent]

```php
 //ActionScript 3 var currentDate:Date = new Date(); trace(currentDate); var answer:String = currentDate.fullYear + "-" + (currentDate.month+1) + "-" + currentDate.currentDate + " " + currentDate.hours + ":" + currentDate.minutes + ":" + currentDate.seconds + ":" + currentDate.milliseconds; trace(answer); // 2012-1-17 10:48:41 trace(currentDate.time); //Trace Mon Mar 18 22:31:28 GMT-0700 2013 2013-3-undefined 22:31:28:331 1363671088331 

```
