October 2002
Intermediate to advanced
1024 pages
27h 26m
English
You want to produce a combined date-and-time value from separate date and time values.
Concatenate them with a space in between.
Combining a date value and a time value to produce a date-and-time value is just a matter of concatenating them with a space in between:
mysql>SET @d = '2002-02-28';mysql>SET @t = '13:10:05';mysql>SELECT @d, @t, CONCAT(@d,' ',@t);+------------+----------+---------------------+ | @d | @t | CONCAT(@d,' ',@t) | +------------+----------+---------------------+ | 2002-02-28 | 13:10:05 | 2002-02-28 13:10:05 | +------------+----------+---------------------+