sql server 2008 - Time calculation for time value entered in SQL -


i need on calculating time difference. search on forum not need. here code using:-

    (convert(varchar(10),([rt_phase_time])-(convert(time,'00:30:00')))) 

so [rt_phase_time] in format 'hh:mm:ss'. trying difference between ([rt_phase_time] - '00:30:00'). please help!

in mysql can timediff().

timediff('22:00:00','00:30:00'); -- returns '21:30:00'  

http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_timediff


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -