|
|
Archives of the TeradataForum
Message Posted: Wed, 08 Dec 2004 @ 16:23:05 GMT
Subj: | | Re: View the date field in dbc.oldpasswords table |
|
From: | | Victor Sokovin |
| Yes, it's 307 days before 0001-01-01 | |
Dieter, thanks for the confirmation. March 1 was the beginning of the Roman New Year, for what that might be worth.
I got frustrated with my calculations on Oracle after I saw this:
SELECT TO_NUMBER(TO_CHAR(SYSDATE, 'J'))-
TO_NUMBER(TO_CHAR(TO_DATE('00010101AD', 'YYYYMMDDAD'), 'J')) A,
TO_NUMBER(TO_CHAR(SYSDATE, 'J')) - TO_NUMBER(TO_CHAR(TO_DATE('00010101BC',
'YYYYMMDDBC'), 'J')) B
FROM dual
returns
A B
731924 732655 ,
which looks like the two years worth of difference to me. At the same time Oracle would tell you that there is no such year as 0000, so
go figure with the dates in that period. My understanding is that 1 BC precedes 1 AD. Am I wrong?
Victor
| |