tags:

views:

66

answers:

1

[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.

A: 

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')
);
gnud