Subject Re: [firebird-support] book error or mine?
Author Helen Borrie
At 01:42 AM 22/09/2006, you wrote:
>If I run
>
>select current_date, extract(weekday from CURRENT_DATE) from rdb$database;
>
>I get (note I'm in the UK, so dates are dd/mm/yyyy)
>
>21/09/2006, 4
>
>but the book says
>
>"weekday extracts the day of the week (having Sunday = 1, Monday = 2,
>and so on" - which would make thursday return 5.
>
>Have I made a mistake or found a typo (it's not on my type list) ?

You've found an error in the book. It's wrong on P. 420, though
right in the chapter on Date/Time types. (Table 10.10, P.
157). WEEKDAY is actually a zero-based set. To further numb and
confuse you, YEARDAY is 1-based, i.e. Jan 1st does return 1.

./heLen