Re: Edad en años

From: "Oscar Cano" <oscarcanorodriguez(at)gmail(dot)com>
To: pgsql-es-ayuda(at)postgresql(dot)org
Subject: Re: Edad en años
Date: 2007-12-24 15:43:17
Message-ID: edacf7a30712240743h6a3d4a8dx3f9edd6105bf7773@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

Mil gracias a todos, finalmente quedo con

SELECT date_part('year',age(f_nace)) as edad FROM candidato WHERE id=119

2007/12/23, Espartano <espartano(dot)mail(at)gmail(dot)com>:
>
> El 23/12/07, Oscar Cano <oscarcanorodriguez(at)gmail(dot)com> escribió:
> > Pero date_part o extrac, me dan la parte de una fecha, ¿como puedo
> calcular
> > la edad en años cumplidos?
> >
>
> -_- pues tienes que aplicar el date_part al resultado de age.
>
> --
> "Linux is for people who hate Windows, BSD is for people who love UNIX".
> "Social Engineer -> Because there is no patch for human stupidity"
> "The Unix Guru's View of Sex unzip ; strip ; touch ; grep ; finger ;
> mount ; fsck ; more ; yes ; umount ; sleep."
> "Documentation is like sex: when it is good, it is very, very good;
> and when it is bad, it is better than nothing."
>

--
Oscar Cano Rodríguez
PLD Consultores

In response to

Responses

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Javier Bermúdez Tito 2007-12-24 16:46:33 RE: Edad en años
Previous Message Alvaro Herrera 2007-12-24 14:04:08 [TLM] Re: Metodo mas rapido que Join ??? Solo una pregunta.