datetime difference for this syntax(d/m/Y H:m:s)
开发者_如何学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')
);
精彩评论