Subject | Re: DayOfWeek equivalent |
---|---|
Author | Adam |
Post date | 2006-05-22T06:25:43Z |
--- In firebird-support@yahoogroups.com, "Adam" <s3057043@...> wrote:
select extract(weekday from current_date)+1 from RDB$DATABASE;
(the +1 is just so it returns the same as Delphi 1-7 instead of 0-6)
Adam
>OK, nevermind I found it:
> Hi Group,
>
> Is there are an equivalent function or way of doing the Delphi
> DayOfWeek function without UDFs within Firebird?
>
> For those not familiar with Delphi, it accepts a date or timestamp and
> returns
>
> 1 if Sunday
> 2 if Monday
> 3 if Tuesday
> ....
> 7 if Saturday
>
> Perhaps there is some Extract command for the DOW that I can use in a
> simple stored procedure.
>
select extract(weekday from current_date)+1 from RDB$DATABASE;
(the +1 is just so it returns the same as Delphi 1-7 instead of 0-6)
Adam