Skip site navigation (1) Skip section navigation (2)

Re: Wildcard in date field

From: "K Parker" <kparker(at)eudoramail(dot)com>
To: pgsql-sql(at)hub(dot)org
Subject: Re: Wildcard in date field
Date: 2000-06-24 05:14:42
Message-ID: CLFEKIBHMPLDFAAA@shared1-mail.whowhere.com (view raw or flat)
Thread:
Lists: pgsql-sql
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

pgsql-sql by date

Next:From: Mitch VincentDate: 2000-06-24 18:27:19
Subject: More full text index..
Previous:From: Tom LaneDate: 2000-06-24 04:37:09
Subject: Re: [HACKERS] query failed , don't know why

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group