Add DATE and TIME fields to get DATETIME field in MySQL

后端 未结 4 954
無奈伤痛
無奈伤痛 2021-01-11 23:16

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 e

4条回答
  •  北荒
    北荒 (楼主)
    2021-01-11 23:35

    @Pekka is right.

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

    CONCAT_WS(' ', date_field,time_field)
    

提交回复
热议问题