Convert a Number to time in Oracle
Hi,
In a oracle database table i have a colum that gives the value from 0 to 2359. I want to convert Number to time in Oracle. Any i dea on the query for this.
I have tried
SELECT TO_CHAR('2342','HH:MI') "Time"
FROM dual;
but it is not functioning.
Thanks
[308 byte] By [
javaqueuea] at [2007-11-27 11:48:22]

# 5
> The Number that i want to convert to Time is of the
> columns of the same table and depending on its value,
> i want to display it as Time.
> Thanks,
Well it sounds like you certainly have no clue what you are doing whatsoever. I predict a bright future for you.
Here's some advice. If the column should have a date or time in it then use a date or time type column. If you are creating a variable data type column then ASAP get a book on SQL before you **** things up worse then you have.
There is no great mystery here. There is the right way (as suggested by WorkForFood) and there is the wrong way (whatever you are doing). So do what WorkForFood told you or just go away because nobody cares to help make a disaster.