can anybody explain me how this Mysql query result is possible.
select
sec_to_time(
unix_timestamp('2014-10-26 02:00:00')-
unix_timestamp('2014-10-25 20:00:00')
);
result:
07:00:00
should be:
06:00:00
can anybody explain me how this Mysql query result is possible.
select
sec_to_time(
unix_timestamp('2014-10-26 02:00:00')-
unix_timestamp('2014-10-25 20:00:00')
);
result:
07:00:00
should be:
06:00:00
Use MySQL TIMEDIFF
or TIME_TO_SEC
like that :-
TIME_TO_SEC(TIMEDIFF('2014-10-26 02:00:00', '2014-10-25 20:00:00'))