RE: - - Fechas

From: Martin Marques <martin(at)bugs(dot)unl(dot)edu(dot)ar>
To: Miguel Angel <mvillagomez(at)sayab(dot)com(dot)mx>
Cc: 'Figo's' <figo_sistemas(at)yahoo(dot)es>, pgsql-es-ayuda(at)postgresql(dot)org
Subject: RE: - - Fechas
Date: 2006-05-12 15:51:26
Message-ID: Pine.LNX.4.61.0605121250230.30527@bugs.unl.edu.ar
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

On Thu, 11 May 2006, Miguel Angel wrote:

> Yo sugiero esto:
>
> SELECT * FROM tabla WHERE EXTRACT(DAY FROM fecha)=EXTRACT(DAY FROM now())

Eso no funciona, ya que falta el mes:

SELECT * FROM tabla
WHERE EXTRACT(DAY FROM fecha) = EXTRACT(DAY FROM now())
AND EXTRACT(MONTH FROM fecha) = EXTRACT(MONTH FROM now())

Saludos... :-)

--
21:50:04 up 2 days, 9:07, 0 users, load average: 0.92, 0.37, 0.18
---------------------------------------------------------
Lic. Martín Marqués | SELECT 'mmarques' ||
Centro de Telemática | '@' || 'unl.edu.ar';
Universidad Nacional | DBA, Programador,
del Litoral | Administrador
---------------------------------------------------------

In response to

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Martin Marques 2006-05-12 15:56:10 Re: PostgreSQL 8.1 sobre Debian Sarge (stable)
Previous Message Daniel Carrero 2006-05-12 15:44:15 Re: Pregunta dolorosa