Time2 PHP time() function calcElapsedTime($time) { // calculate elapsed time (in seconds!) $diff = time()-$time; $daysDiff = floor($diff/60/60/24); $diff -= $daysDiff*60*60*24; $hrsDiff = floor($diff/60/60); $diff -= $hrsDiff*60*60; $minsDiff = floor($diff/60); $diff -= $minsDiff*60; $secsDiff = $diff; return ('(elapsed time '.$daysDiff.'d '.$hrsDiff.'h '.$minsDiff.'m '.$secsDiff.'s)'); } 2008. 10. 14. MYSQL unix time을 date 형식으로 보기 쿼리 qry="select no,os,browser,ip, from_unixtime(`reg_date`,'%Y%m%d%H') as hh from weblog where ip='$ip' order by reg_date desc" 2008. 10. 10. 이전 1 다음