How do i convert milliseconds into hr:mi:ss format both in oracle and sqlserver.
eg: i have 140000 milliseconds ,how can i convert that into hr:mi:s format.
what is the query for this and is there a common query which works both for oracle and sqlserver database.
I am using oracle 8x and sqlserver 2000.
Thanks in advance
I dont know it this work in SQLServer, but in Oracle you can do:
select to_char (to_date(round(140000/1000), 'SSSSS' ), 'HH24:MI:SS') AS HMS from dual;
If you have more than 86399 seconds (seconds in a day) you must modify de sentence to detect that and add 24 hours to the result.
Click Here to Expand Forum to Full Width