SELECT tb.* , case WHEN TIMEDIFF(NOW(), tb.createdDate) < 1 THEN concat(MINUTE(TIMEDIFF(NOW(), tb.createdDate)), ' 분전') WHEN TIMEDIFF(NOW(), tb.createdDate) < 24 THEN concat(HOUR(TIMEDIFF(NOW(), tb.createdDate)), ' 시간전') ELSE concat(DATEDIFF(NOW(), tb.createdDate), ' 일전') END as agoTime FROM tbl_board tb
댓글 ( 4)
댓글 남기기