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-04-04T12:31:00"...I wanted to know if there are any other ways as i`m not satisfied with this format.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
select to_char(col_name, 'yyyy-mm-dd hh24:mi:ss') from tab_name
You can read more about to_char
function here
回答2:
Another very simple way is to set, in the database nls parameters, the parameter date_format='DD-MM-YYYY HH24:MI:SS'