Save date in seconds since the Unix Epoch 'U'
Is it possible to setup the date-picker to post the 'U' value (Seconds since the Unix Epoch) into my database but show friendly dates, in my case UK format (jS M Y).
Is it possible to setup the date-picker to post the 'U' value (Seconds since the Unix Epoch) into my database but show friendly dates, in my case UK format (jS M Y).
you can convert the the date that is posted by the datepicker to a timestamp using the strtotime() function.
in the insert record behavior, when you bind the date column to the date form element, it will generate code similar to:
[php]
<?php echo((isset($_POST["thedate"]))?$_POST["thedate"]:"") ?>[php]
change that to:
[php]
<?php echo((isset($_POST["thedate"]))?strtotime($_POST["thedate"]):"") ?>[php]
in order to store the timestamp.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.