Hello folks.
I'm having a trouble comparing birthday.
The trouble I'm having is that I can't
compare birthday in the specific range
regardless of year.
I would like to run query such as
"give me all rows that contains birthday
between May 15th and June 3rd".
I'm using postgresql and ran separate
queries on month and date by using
extract(month from birthdate) and
extract(day from birthdate) and
took intersection of them. But the
problem with this method is that
the date range like between May 15th and
June 3rd doesn't doesn't include May 21st
within the range, for example.
If I can replace the year part of birthdate
to the all the same year and store it in
a temporary table, that would be the easiest
solution. But postgres rejected the statement
like:
update users
set extract(year from birthdate) = '1970';
Is there any insights?
Thank you...
Takeshi Amano