--=__Part416814F7.0__=
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
select * from mytable where date_trunc('month', mydate) =3D
date_trunc('mon=
th', now());
>>> Frank Bax <fbax@[EMAIL PROTECTED]
> 2008-04-24 15:06 >>>
Nacef LABIDI wrote:
> is there a better method to retrieve all=20
> the rows with dates in the current month.
select * from mytable where extract(month from mydate) =3D
extract(month=20=
from now()) and extract(year from mydate) =3D extract(year from now());
--=20
Sent via pgsql-sql mailing list (pgsql-sql@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
--=__Part416814F7.0__=
Content-Type: text/html; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dutf-8">
<META content=3D"MSHTML 6.00.2800.1264" name=3DGENERATOR></HEAD>
<BODY style=3D"MARGIN: 4px 4px 1px; FONT: 10pt Tahoma">select * from =
mytable where date_trunc('month', mydate) =3D date_trunc('month', =
now());<BR><BR><BR>>>> Frank Bax <fbax@[EMAIL PROTECTED]
=
2008-04-24 15:06 >>><BR>Nacef LABIDI wrote:<BR>> is there a =
better method to retrieve all <BR>> the rows with dates in the current
=
month.<BR><BR><BR>select * from mytable where extract(month from mydate) =
=3D extract(month <BR>from now()) and extract(year from mydate) =3D =
extract(year from now());<BR><BR>-- <BR>Sent via pgsql-sql mailing list =
(pgsql-sql@[EMAIL PROTECTED]
)<BR>To make changes to your subscription:<BR><A
=
href=3D"http://www.postgresql.org/mailpref/pgsql">http://www.postgresql.org=
/mailpref/pgsql</A>-sql<BR></BODY></HTML>
--=__Part416814F7.0__=--