note 81657 deleted from function.date by derick
| From: | derick@php.net | Date: | Wed, 07 May 2008 18:15:48 +0000 |
| Subject: | note 81657 deleted from function.date by derick | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-139139@lists.php.net to get a copy of this message | ||
Note Submitter: takzik at ebanat dot com
----
1st function dd.mm.yyyy => yyyy-mm-dd, second - just the opposite way.
<?php
function converttomysqlDate($mydate) {
list($dd,$mm,$yy)=explode(".",$mydate);
if (is_numeric($yy) && is_numeric($mm) && is_numeric($dd)) {
return "$yy-$mm-$dd";
}
}
function converttosimpleDate($mydate) {
list($yy,$mm,$dd)=explode("-",$mydate);
if (is_numeric($yy) && is_numeric($mm) && is_numeric($dd)) {
return "$dd.$mm.$yy";
}
}
?>