Skip site navigation (1) Skip section navigation (2)

[TLM] Re: Edad en años

From: "Oscar Cano" <oscarcanorodriguez(at)gmail(dot)com>
To: pgsql-es-ayuda(at)postgresql(dot)org
Subject: [TLM] Re: Edad en años
Date: 2007-12-24 15:43:17
Message-ID: 20071224154501.1B1AC414281@qatlm3.calidad2.pandasoftware.com (view raw or flat)
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

pgsql-es-ayuda by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group