How to get datetime in 24hour format from oracle database?

前端 未结 2 1350
慢半拍i
慢半拍i 2021-02-05 03:03

Is there any other way to get datetime field from oracle database in 24hour format???like -> \"select getxsddate(col_name) from tab_name\" will get you datetime format as \"2012

2条回答
  •  半阙折子戏
    2021-02-05 03:35

    select to_char(col_name, 'yyyy-mm-dd hh24:mi:ss') from tab_name
    

    You can read more about to_char function here

提交回复
热议问题