note 20241 deleted from function.strtotime by sniper
| From: | sniper@php.net | Date: | Tue, 21 Oct 2003 11:05:05 +0000 |
| Subject: | note 20241 deleted from function.strtotime by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-59023@lists.php.net to get a copy of this message | ||
Note Submitter: jb@thebit.de
----
// converts a Date (used by Sybase ASE)
// like "Mar 1 2002 12:00:00:000AM"
// to "01.03.2002"
function GetDateFromSybase( $aDate )
{
$result = trim( $aDate );
$result = str_replace( " ", " ", $result );
list( $aMonth, $aDay, $aYear, $theRest ) =
explode( " ", $result, 4 );
$result = date( "d.m.Y",
strtotime("$aDay $aMonth $aYear"));
return $result;
}