[ create a new paste ] login | about

Link: http://codepad.org/heph1PG0    [ raw code | output | fork ]

PHP, pasted on May 13:
1
2
3
4
5
6
7
8
<?php

$date = str_replace("@ ", "", "30/05/2010 @ 09:15:15");
$date = str_replace("/", "-", $date);
$formatteddate = date("Y-m-d H:i:s", strtotime($date));
echo $formatteddate;

?>


Output:
1
2010-05-30 09:15:15


Create a new paste based on this one


Comments: