开发者

How can I get difference of two dates through MYSQL select query

H开发者_如何学编程ow can I get difference of two dates (up to seconds precision) through MYSQL select query.

Can some one guide me in this regards.


Returns the difference in seconds between two dates.

SELECT TIME_TO_SEC(TIMEDIFF('2007-01-09 10:24:46','2007-01-09 10:23:46'));


You can use DATEDIFF() or TIMEDIFF()

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜