Subject RE: [firebird-support] Extract weekday
Author Clay Shannon
<<
>
ROUND 1:

Martijn wrote: >Which means 1 = Sunday, not 1 = Monday.
>
>:-)

Helen wrote: Erp, yes. Subtract 1.


ROUND 2:
Martijn wrote:
>Now, wouldn't Stored Functions be nice... :-/
>
>function ExtractWeekday(aDate: DATE): SmallInt
>as
>begin
> returns extract(weekday from aDate - 1) + 1;
>end;
>
>Pitty this isn't making it into Fb 2... :-/

Helen wrote:
Since it only has to roll Sunday over from 0 to 7, this won't give the
right result either. (Monday is already 1).>>



I thought this "Battle of the FB Giants" was only going to be available via
Pay-Per-View!

Clay Shannon,
Dimension 4 Software