Conversion
|
|
|
|
<?php function timestamp_db_php($date)
{
$year = substr($date,0,4);
$month = substr($date,4,2);
$day = substr($date,6,2);
$hour = substr($date,8,2);
$minute = substr($date,10,2);
$second = substr($date,12,2);
//$epoch = date("U", mktime($time[0],$time[1],$time[2],$datebreak[1],$datebreak[2],$datebreak[0]));
$datetime = $month."-".$day."-".$year." ".$hour.":".$minute.":".$second." ";
return $datetime;
} ?>
|
|
|
Usage Example
|
timestamp_db_php("20021215153817"); would return "12-15-2002 15:38:17".
|
|
|
Rate This Script
|
|
|
|