ballingtonma
03-26-2004, 09:42 PM
Hi,
I have a column that is a timestamp so as soon as a new row is added it inserts the current date.
It is formated like: 20040326114906
And i break it up by doing:
$joined = $row["joined"];
$day = substr("$joined", 6, 2);
$month = substr("$joined", 4, 2);
$year = substr("$joined", 0, 4);
$hour = substr("$joined", 8, 2);
$min = substr("$joined", 10, 2);
$sec = substr("$joined", 12, 2);
$joined = "$day $month $year, $hour:$min:$sec";
But, i was wandering if there was an easier way to do it and also in GMT time.
Thanks is advance,
Matt
I have a column that is a timestamp so as soon as a new row is added it inserts the current date.
It is formated like: 20040326114906
And i break it up by doing:
$joined = $row["joined"];
$day = substr("$joined", 6, 2);
$month = substr("$joined", 4, 2);
$year = substr("$joined", 0, 4);
$hour = substr("$joined", 8, 2);
$min = substr("$joined", 10, 2);
$sec = substr("$joined", 12, 2);
$joined = "$day $month $year, $hour:$min:$sec";
But, i was wandering if there was an easier way to do it and also in GMT time.
Thanks is advance,
Matt
