View Single Post
  #2 (permalink)  
Old 08-06-2008, 07:39 AM
Capo64 Capo64 is offline
Contributing Member
 
Join Date: 06-11-07
Posts: 238
iTrader: 0 / 0%
Code:
<? $date = 8-6-2008 $d = explode('-',$date) $daysAgo = round( ( mktime(0,0,0,$d[0],$d[1],$d[2]) - time() ) / 86400 ) ?>
Then you can use a switch case to see how many days ago it was.
HTH. If you have the seconds minutes and hours it can be more accurate
 
Reply With Quote