Re: Birth Day Calculation

From: Osvaldo Rosario Kussama <osvaldo_kussama(at)yahoo(dot)com(dot)br>
To: Ashish Karalkar <ashish(dot)karalkar(at)info-spectrum(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Birth Day Calculation
Date: 2007-07-18 13:56:04
Message-ID: 469E1BF4.1020605@yahoo.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Ashish Karalkar escreveu:
> Hello All,
>
> I want to diplay all the name of persons who falls in between given day
> and month
> something like
>
> select name from my_table mt where mt.date_of_birth between 7-Jul and
> 15 - Aug
>
>
> column date_of_birth is of date type
>

SELECT name FROM my_table mt
WHERE to_char(mt.date_of_birth,'mmdd') between '0707' and '0815'

Osvaldo

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Chris Browne 2007-07-18 14:57:40 Re: Database Synchronization
Previous Message Fernando Hevia 2007-07-18 12:46:33 Re: Inserting an IF statement in the middle of a SELECT in pl/pgSQL code