Subject | Re: [firebird-support] select birthdays from the next several days |
---|---|
Author | Federico Tello Gentile |
Post date | 2005-09-23T14:04:07Z |
Arno Brinkman wrote:
Is that a function? I see it is used as one, but the parameters are
weird having the from keyword inside. Is that syntax only used to get
those values from dates and times?
EXTRACT is not in the interbase 6 languaje reference... (Or didn't see it).
select
extract(year FROM current_date) as y,
extract(month FROM current_date) as m,
extract(day FROM current_date) as d,
extract(hour FROM current_time) as h,
extract(minute FROM current_time) as m,
extract(second FROM current_time) as s
from rdb$database
> SELECTThis is the first time I see the extract(day from current_date).
> PersonName,
> Birthday
> FROM
> Persons
> WHERE
> (EXTRACT(MONTH FROM Birthday) * 100) +
> EXTRACT(DAY FROM Birthday) BETWEEN
> (EXTRACT(MONTH FROM CURRENT_DATE) * 100) +
> EXTRACT(DAY FROM CURRENT_DATE) and
> (EXTRACT(MONTH FROM CURRENT_DATE + 14) * 100) +
> EXTRACT(DAY FROM CURRENT_DATE + 14)
Is that a function? I see it is used as one, but the parameters are
weird having the from keyword inside. Is that syntax only used to get
those values from dates and times?
EXTRACT is not in the interbase 6 languaje reference... (Or didn't see it).
select
extract(year FROM current_date) as y,
extract(month FROM current_date) as m,
extract(day FROM current_date) as d,
extract(hour FROM current_time) as h,
extract(minute FROM current_time) as m,
extract(second FROM current_time) as s
from rdb$database