开发者

datetime difference for this syntax(d/m/Y H:m:s)

开发者 https://www.devze.com 2022-12-11 16:39 出处:网络
开发者_如何学C[Duplicate of DateTime difference from two tables] Hi, I need to find the date time difference from 2 tables.

开发者_如何学C[Duplicate of DateTime difference from two tables]

Hi, I need to find the date time difference from 2 tables.

My date time type is Varchar and the format is(d/m/Y H:m:s).

How to find the datetime difference from 2 tables.


Have a look at the documentation. Play around with, for example

SELECT (TIMEDIFF(
    STR_TO_DATE('01/02/2009 12:00:00', '%d/%m/%Y %T'), 
    STR_TO_DATE('01/01/2009 12:00:00', '%d/%m/%Y %T')
);
0

精彩评论

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