View Single Post
Old 08-17-2009, 02:54 PM   #2 (permalink)
JaoudeStudios
The Acquainted
 
JaoudeStudios's Avatar
 
Join Date: Jul 2009
Location: Surrey
Posts: 105
Thanks: 1
JaoudeStudios is on a distinguished road
Default

$date = substr($lastupdate, 0, 10); // will remove the time
$date_ = explode('-', $date);
$day = $date[2];

This is not ideal. What version of php are you running. The latest version (php 5.3) has some very cool and easy to use date manipulation functionality. Or you could use Zend_date to achieve the same. Else I would convert it to a unix time stamp and do the calculation from there.
__________________
JaoudeStudios.com | JaoudeStudios.com Forum | JaoudeStudios.com Blog
OpenSource is the road ahead...!
JaoudeStudios is offline  
Reply With Quote