mysql - Difference between two datetime entries -
select eta,sta `schedule` `num`="5567";
2013-08-26 18:37:00 2013-08-26 18:30:00
select datediff(eta,sta) `schedule` `num`="5567";
0
why result 0 instead of 7 (i.e. minutes)?
datediff give result in days.
select hour (eta - sta) `schedule` `num`="5567";
an alternative hour difference.
Comments
Post a Comment