MariaDB [test]> select
-> timediff('2014-01-01 00:00:00' , '2014-01-01 01:00:00' ),
-> timediff(20140101000000.000 , 20140101010000.000 ),
-> timediff(20140101000000.000 , '2014-01-01 01:00:00' ),
-> datediff('2014-01-01 00:00:00' , '2014-01-02 01:00:00' ),
-> datediff(20140101000000.000 , 20140102010000.000 ),
-> datediff(20140101000000.000 , '2014-01-02 01:00:00' )\G
*************************** 1. row ***************************
timediff('2014-01-01 00:00:00' , '2014-01-01 01:00:00' ): -01:00:00
timediff(20140101000000.000 , 20140101010000.000 ): -01:00:00.000
timediff(20140101000000.000 , '2014-01-01 01:00:00' ): NULL
datediff('2014-01-01 00:00:00' , '2014-01-02 01:00:00' ): -1
datediff(20140101000000.000 , 20140102010000.000 ): -1
datediff(20140101000000.000 , '2014-01-02 01:00:00' ): -1
1 row in set (0.03 sec)