Answer the question
In order to leave comments, you need to log in
Combining date and time?
There are 2 columns, date and time_end, their types are DATE and TIME respectively.
The question is how to combine these 2 values so that it would be something like 2018-03-15 12:51:30. I know that there is CONCAT, etc. but for some reason, when I combine date and time_end in a line with id=2, then I get 2017-01-04 24:00:00. The question is why am I getting 24 and not 00? and what to do to get 00? I tried converting to types, it didn’t seem to work (
Answer the question
In order to leave comments, you need to log in
select CAST(date as DATETIME) + CAST(time_end as TIME)
from ...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question