pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: K Parker <kparker@eudoramail.com>
To: pgsql-sql@hub.org
Subject: Re: Wildcard in date field
Date: Fri, 23 Jun 2000 22:14:42 -0700
Message-ID: <CLFEKIBHMPLDFAAA@shared1-mail.whowhere.com> (raw)

The suggest solution works:

>  SELECT  * FROM my_table WHERE
>  date_part('month', col_name::datetime) = '06' 
>  AND date_part('year', col_name::datetime) =
>  '2000';

But you can also just do a comparison:

  where col_name >= '2000-06-01' AND col_name <= '2000-06-30'

Using the correct date format for your environment, of course.



Join 18 million Eudora users by signing up for a free Eudora Web-Mail account at http://www.eudoramail.com



view thread (4+ messages)

Message-ID: <CLFEKIBHMPLDFAAA@shared1-mail.whowhere.com>
Permalink:  ../CLFEKIBHMPLDFAAA@shared1-mail.whowhere.com/
Also on:    postgresql.org/message-id/CLFEKIBHMPLDFAAA@shared1-mail.whowhere.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: kparker@eudoramail.com, pgsql-sql@hub.org
  Subject: Re: Wildcard in date field
  In-Reply-To: <CLFEKIBHMPLDFAAA@shared1-mail.whowhere.com>
  References: <CLFEKIBHMPLDFAAA@shared1-mail.whowhere.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox