Convert a Javascript Date format to desired PHP format
How can we change Wed Jun
09 2010 which is returns from a javascript function and get in a php script.I
need to convert this date format to 2010-06-09.Thanks
Answer:
<?php
$jsDateTS = strtotime($jsDate);
if ($jsDateTS !== false)
date('Y-m-d', $jsDateTS );
else
// .. date format invalid
COMMENTS