tags:

views:

21

answers:

2

Hi,

I am trying to get a DATETIME field from a DATE and a TIME field. none of the functions in MYSQL seems useful.

Is somebody aware how to do this or that if this can even be done? :)

+1  A: 

It should be as easy as

UPDATE table SET datetime_field = CONCAT(date_field, " ", time_field);
Pekka
thanks pekka and sadat, this works. :)
Anup
A: 

@Pekka is right.

Also you can use CONCAT_WS(seperator, val1, val2,....)

CONCAT_WS(' ', date_field,time_field)
Sadat