|
This SQL script:
SET timestamp=UNIX_TIMESTAMP('2014-04-14 10:20:30');
|
SELECT CAST(TIME'10:20:30' AS DATETIME), TIME'10:20:30'=TIMESTAMP'2014-04-14 10:20:30' AS cmp;
|
demonstrates that conversion between TIME and DATETIME
does not add CURRENT_DATE to TIME.
+----------------------------------+-----+
|
| CAST(TIME'10:20:30' AS DATETIME) | cmp |
|
+----------------------------------+-----+
|
| 2014-04-14 10:20:30 | 0 |
|
+----------------------------------+-----+
|
MySQL-5.6 returns "1" in the "cmp" field in the same scenario.
|