Subject | RE: [firebird-support] Firebird timestamp data type.. |
---|---|
Author | Helen Borrie |
Post date | 2004-11-17T13:38:58Z |
At 11:43 PM 17/11/2004 +1100, you wrote:
and time zero" - or "the first moment of the first day". The stroke of
midnight (time 00:00:00:00:0000) is the first moment of the day. Does that
help?
select cast('17.11.1858' as DATE) +1 as NextDate from rdb$database will
return the day after the first day, i.e. 18.11.1858 (or 18-NOV-1858)
and
select cast('17.11.1858' as DATE) -1 as LastDate from rdb$database will
return 16.11.1858 (or 16-NOV-1858)
./hb
>Hi GuysI understand why you're asking it. Midnight on 17 November 1850 is "date
>
>Thanks (Martijn & Helen) I had an attack of "cognitive dissonance" & was
>thinking day "zero" had to be the same as the 1st date that can be recorded
>in a FB DB. Of course the quote from your (Helen's) book mentioned it was
>stored in a "signed" 32 bit integer which should have clicked.
>
>Now being pedantic (pre-requisite for all decent programmers) I have 1 last
>point to clarify. Is the "base" mentioned in Ann's "17 November 1858 as the
>base of FB's DATE", base 0 or base 1 (when I went to school we learned to
>count from 1) or in other words, is it the 16 November 1858 or the 17
>November 1858 which has the honour of being stored in FB as 0 (zero)?
>
>This is a serious question!
and time zero" - or "the first moment of the first day". The stroke of
midnight (time 00:00:00:00:0000) is the first moment of the day. Does that
help?
select cast('17.11.1858' as DATE) +1 as NextDate from rdb$database will
return the day after the first day, i.e. 18.11.1858 (or 18-NOV-1858)
and
select cast('17.11.1858' as DATE) -1 as LastDate from rdb$database will
return 16.11.1858 (or 16-NOV-1858)
./hb