0

I have a database table that stores some times as numbers, for example 3:30am is stored as 330, 4pm is stored as 1600 and I would like to convert these to a string e.g. 16:00. Don't have a clue how to do this though as my oracle skills are a little lacking.

DasDave
  • 801
  • 1
  • 9
  • 28
  • Refer following URLs [SQL - Converting 24-hour (“military”) time (2145) to...][1] [1]: http://stackoverflow.com/questions/1572927/sql-converting-24-hour-military-time-2145-to-am-pm-time-945-pm – Gehan Fernando Aug 07 '15 at 08:22
  • Thanks, @GehanFernando but viral Pathak answer included it in an oracle format. – DasDave Aug 07 '15 at 08:26

1 Answers1

0

Try Below

SELECT TO_DATE(TO_CHAR(1600,'0000'),'HH24MI') FROM DUAL;