pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Osvaldo Rosario Kussama <osvaldo_kussama@yahoo.com.br>
To: Ashish Karalkar <ashish.karalkar@info-spectrum.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Birth Day Calculation
Date: Wed, 18 Jul 2007 10:56:04 -0300
Message-ID: <469E1BF4.1020605@yahoo.com.br> (raw)
In-Reply-To: <01d801c7c92b$317e83a0$170211ac@LIONKING.COM>
References: <01d801c7c92b$317e83a0$170211ac@LIONKING.COM>

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



view thread (2+ messages)

Message-ID: <469E1BF4.1020605@yahoo.com.br>
Permalink:  ../469E1BF4.1020605@yahoo.com.br/
Also on:    postgresql.org/message-id/469E1BF4.1020605@yahoo.com.br

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: osvaldo_kussama@yahoo.com.br, ashish.karalkar@info-spectrum.com
  Subject: Re: Birth Day Calculation
  In-Reply-To: <469E1BF4.1020605@yahoo.com.br>

* 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