Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 533
  • Last Modified:

Oracle number(12) to seconds

Hi experts,

I'm new to database/sql, but using TOAD I'm trying to run senseful queries against an oracle database. I have problems understanding how an 'elapsed time' stored as number(12) can be translated to seconds. If at all possible. Maybe I'm looking at the wrong place for this data.
This shouldn't necessarily happen in the query, after export to excel is as good.

Thanks.
WatNog
0
Watnog
Asked:
Watnog
  • 2
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
seconds is "time", and number(12) means up to 999999999999 seconds (if the elapsed time is indeed stored as seconds), which would mean plenty of years ...
0
 
WatnogAuthor Commented:
That would be weird, elapsed time is hours at the maximum. And one wouldn't create a 12 digit number if that wouldn't be necessary I guess. I will need to review this.
In the meantime thanks.
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
it may be milliseconds also ...
still 11574 days ...

for seconds in a day, you would need to store max 86400 as a number (so number(5))
for milliseconds it would be 3 digits more (number(8))
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now