Happy to help with that one...
SQL> select to_char(to_date(sysdate,'dd-mon-yy'),'j') from dual;
TO_CHAR
-------
2452935
SQL> select to_char(to_date('2452935','j'),'dd-mon-yyyy') from dual;
TO_CHAR(TO_
-----------
22-oct-2003
Now, interestingly,
SQL> select to_char(to_date('728464','j'),'dd-mon-yyyy') from dual;
TO_CHAR(TO_
-----------
05-jun-2718
BUT, if you misstate sysdate, you can do something like this...
SQL> select to_char(to_date(sysdate,'dd-mon-yyyy'),'j') from dual;
TO_CHAR
-------
1722448
SQL> select to_char(to_date('1722448','j'),'dd-mon-yyyy') from dual;
TO_CHAR(TO_
-----------
22-oct-0003
What's interesting there is the similarity between 1722448 and 728464.
Maybe there's some kind of conversion algorithm at play to make sure you
can't read your data without the app. Kinda cheeky, but it's possible (it
used to be called "job security"). If I were you, what I would do is run
that app with a "BDATE" that you know and pfutz around with the julian
function until you get it... it's probably not so complicated... add a 1 at
the beginning, mix up the second and third numbers, something like that.
Have fun and good luck!
Bambi.
-----Original Message-----
Sent: Wednesday, October 22, 2003 11:25 AM
To: Multiple recipients of list ORACLE-L
Are you sure he didn't mean Julian dates? Somewhere, someplace you are
bound to find the algorithm that converts between Julian and Gregorian
dates. I had it .... once .... a long time ago.
> -----Original Message-----
>
> Hi to all!
>
> We have an old app that manages something that my boss
> calls: boolean dates.
>
> He told me that exists an algorithm that manages dates
> as a boolean format.
>
> We have several tables in this form:
>
> Note: The following table: PAAM
> has the field BDATE defined as NUMBER.
>
> sql> select bdate from paam
> sql> where rownum < 6
>
> BDATE
> ----------
> 728464
> 728434
> 728403
> 728495
> 728283
>
> now, I need to convert that format to an
> 'understandable' format to get the old data and old
> dates.
>
> I'm looking (google-ing) for that subject but, without
> luck.
>
> any ideas? help?, pls...
>
> Thanks in advance
>
> Regards!
> JL
>
>
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Shopping - with improved product search
> http://shopping.yahoo.com
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author: Jose Luis Delgado
> INET: [EMAIL PROTECTED]
>
> Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> San Diego, California -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
>
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: <[EMAIL PROTECTED]
INET: [EMAIL PROTECTED]
Fat City Network Services -- 858-538-5051 http://www.fatcity.com
San Diego, California -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Bellow, Bambi
INET: [EMAIL PROTECTED]
Fat City Network Services -- 858-538-5051 http://www.fatcity.com
San Diego, California -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).