Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 From decimal number to hh:mm:ss format

Author  Topic 

dado
Starting Member

1 Post

Posted - 2010-07-22 : 16:23:07
Hello.

Maybe this is not a good place to ask this question but i have a problem which is bugging me all day ....
I have to import some data from excell file to oracle db.
This is not the problem.
The problem gets, when i read time which is written in decimal number, because i have to convert this decimal number to hh:mm:ss format.

Example:
0,152280092592593 is 3:39:17
decimal number -> hh:mm:ss.

I am running out of ideas how to solve this problem. I need a solution for pl/sql. Any proposals what the formula which convert this decimal number to hh:mm:ss is?
Thx in advance.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-07-22 : 16:26:38
You've posted your question on a Microsoft SQL Server forum. We do not specialize in pl/sql. You should post your question on a site that specializes in Oracle and pl/sql, try dbforums.com or Oracle's web site.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2010-07-22 : 17:08:35
SELECT CONVERT(CHAR(8), DATEADD(SECOND, 86400 * 0.152280092592593, 0), 8)



N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page
   

- Advertisement -