Re: [Pgsql-ayuda] fechas....

From: "PostgreSql(at)CreaSoluciones(dot)cl" <postgresql(at)creasoluciones(dot)cl>
To: <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>
Subject: Re: [Pgsql-ayuda] fechas....
Date: 2003-07-31 19:07:25
Message-ID: 000e01c35796$fc3ef080$0300000a@winme
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

> On Thu, Jul 31, 2003 at 04:01:34PM +0000, GUSTAVO MARTIN OCAMPO wrote:
> > Hola lista!
> > Tengo un campo tipo 'Date' del cual quiero obtener solo el a?o, por
ejemplo:
>
> select extract(year from fecha_vencimiento)
>

Otra forma es usando to_char.

select to_char(fecha_vencimiento, 'yyyy')

Alfonso Andaur L.
Crea Soluciones de IngenierĂ­a Ltda.
"Creando soluciones de confianza"

In response to

Responses

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Alex Nu 2003-07-31 19:44:51 [Pgsql-ayuda] Insertar datos desde C
Previous Message Sergio Valdes 2003-07-31 17:30:07 [Pgsql-ayuda] Llamar una funcion