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
select to_char(col_name, 'yyyy-mm-dd hh24:mi:ss') from tab_name
You can read more about to_char function here
to_char
Another very simple way is to set, in the database nls parameters, the parameter date_format='DD-MM-YYYY HH24:MI:SS'