Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 760787
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T15:45:36+00:00 2026-05-14T15:45:36+00:00

I’m trying to read the Borland Starteam application oracle database and I noticed that

  • 0

I’m trying to read the Borland Starteam application oracle database
and I noticed that they represent their date as a number(16,10) column.
I think it is not timestamp or epoch. For instance, I have the number: 37137.4347569444, how can I read it as date?

I saw that the database has a stored procedure, CONVERT_DATE:

CREATE OR REPLACE procedure STARBASE.convert_date 
      ( number_of_days IN integer 
         , nDate OUT number) 
is 
    nDateOffset number; 
    CurrentDate date; 
    Month integer; 
    Day integer; 
    year number; 
    success boolean := false; 
    bLeapYear boolean:=false;
    nDaysInMonths number; 
    nLeapDays integer; 
    fDate number (16,10); 
    rgMonthDays number(5,0); 
begin 
    select sysdate - number_of_days 
    into CurrentDate 
    from dual; 
    nDateOffset := 693959; 
    select to_number(substr((TO_CHAR (CurrentDate, 'MM-DD-YYYY')) , 1, 2), '99') - 1 
    into month 
    from dual; 
    select to_number(substr((TO_CHAR (CurrentDate, 'MM-DD-YYYY')) , 4, 2), '99') - 1 
    into day 
    from dual; 
    select to_number(substr((TO_CHAR (CurrentDate, 'MM-DD-YYYY')) , 7, 4), '9999') 
    into year 
    from dual; 
    if ( mod(year , 4) = 0 ) 
        and ( ( mod(year , 400) = 0) or ( mod(year , 100) <> 0 )) 
    then
        bLeapYear :=true; 
    end if; 
    nLeapDays := 0; 
    if ( bLeapYear = true) and ( Day = 28) and ( Month = 1 ) 
    then 
        nLeapDays := 1; 
    end if; 
    select substr(to_char(last_day(CurrentDate) , 'DD-MM-YYYY') , 1 , 2)
    into nDaysInMonths 
    from dual; 
    if Month = 0 then 
        rgMonthDays := 0; 
    elsif Month = 1 then 
         rgMonthDays := 31; 
    elsif Month = 2 then 
        rgMonthDays := 59; 
    elsif Month = 3 then 
        rgMonthDays := 90; 
    elsif Month = 4 then 
        rgMonthDays := 120; 
     elsif Month = 5 then 
         rgMonthDays := 151; 
     elsif Month = 6 then 
         rgMonthDays := 181; 
     elsif Month = 7 then 
         rgMonthDays := 212; 
     elsif Month = 8 then
         rgMonthDays := 243; 
     elsif Month = 9 then
         rgMonthDays := 273; 
     elsif Month = 10 then 
         rgMonthDays := 304; 
     elsif Month = 11 then 
         rgMonthDays := 334; 
     elsif Month = 12 then 
         rgMonthDays := 365; 
     end if;
     nDate := Year*365 + Year/4 - Year/100 + Year/400 + rgMonthDays + Day + 1; 
     if( Month < 2 ) and ( bLeapYear = true) then 
         nDate := nDate - 1;
     end if;
     nDate := nDate - nDateOffset; 
 exception 
     when others then raise; 
end convert_date;

I don’t know how to use it.

how can i read it anyway?
Please help.
thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T15:45:37+00:00Added an answer on May 14, 2026 at 3:45 pm

    The number 693959 is the clue here. That is the number of days from 1/1/00 (the year zero never existed, but I digress) to 12/30/1899. That date was often used as the epoch for older databases where date was represented as a double. So something like this should put you back in business:

    CREATE FUNCTION float_to_date(p_days NUMBER)
    RETURN DATE IS
    BEGIN
      RETURN to_date('1899-12-30', 'YYYY-MM-DD') + p_days;
    END;
    

    Test it of course. The number 37137.4347569444 should correspond to 2001-09-03 10:26:03.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I am trying to loop through a bunch of documents I have to put
I have a bunch of posts stored in text files formatted in yaml/textile (from
We're building an app, our first using Rails 3, and we're having to build
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I'm making a simple page using Google Maps API 3. My first. One marker
I have some data like this: 1 2 3 4 5 9 2 6

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.