30-08-2007, 17:04
|
#9 (permalink)
|
|
i'm done, son
Join Date: Jan 2005
Posts: 12,262
|
Similar to your datetime function, I wrote one today that takes a datetime ("YYYY-MM-DD HH:MM:SS") and breaks it up into its constituent parts and returns an array:
PHP Code:
function datetime_breakup($datetime) { $timestamp = strtotime($datetime); $date['y'] = date('Y', $timestamp); $date['m'] = date('m', $timestamp); $date['d'] = date('d', $timestamp); $date['h'] = date('H', $timestamp); $date['i'] = date('i', $timestamp); $date['s'] = date('s', $timestamp); return $date; }
Last edited by pgo : 30-08-2007 at 17:38.
|
|
|
|