From: | "Ing(dot) Jhon Carrillo" <jdigital(at)cantv(dot)net> |
---|---|
To: | "FENALCO - Mauricio Henao" <mhenao(at)fenalcoantioquia(dot)com(dot)co>, <pgsql-es-ayuda(at)postgresql(dot)org> |
Subject: | Re: Ayuda con fechas |
Date: | 2005-05-20 20:26:32 |
Message-ID: | 032001c55d7a$bd88ce60$1400a8c0@tgusta2 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-es-ayuda |
select to_char(current_date,'DD');
select to_char(current_date,'MM');
select to_char(current_date,'DD/MM');
select to_char(current_date,'DD/MM/YYYY');
select to_char(current_date,'YYYY-MM-DD HH24:MI:SS');
suerte
----- Original Message -----
From: FENALCO - Mauricio Henao
To: pgsql-es-ayuda(at)postgresql(dot)org
Sent: Friday, May 20, 2005 3:21 PM
Subject: [pgsql-es-ayuda] Ayuda con fechas
Hola.
Ya voy entendiendo mejor el PostGreSQL.
Pero me abarca una duda.
Si en Sql podia trabajar con GetDate() para capturar la fechaactual, en PostgreSql es con current_date, verdad?
Pero, como hago para capturar SEPARADAMENTE el dia, mes y año de ese current_date?
Al hacer:
select month(current_date)
Me sale:
ERROR: function month(date) does not exist
HINT: No function matches the given name and argument types. You may need to add explicit type casts.
Como es eso de un Cast Implicito?
Mauricio Henao Romero.
Coordinador de Comercio Electrónico
Fenalplaza
mhenao(at)fenalcoantioquia(dot)com(dot)co
fenalplaza(at)fenalcoantioquia(dot)com(dot)co
webmaster(at)fenalcoantioquia(dot)com(dot)co
Tel. 216 1888 Ext 186
From | Date | Subject | |
---|---|---|---|
Next Message | Ricardo Fuentes Pereira | 2005-05-20 20:30:27 | Re: Optimizar consulta |
Previous Message | Manuel Sugawara | 2005-05-20 20:25:34 | Re: Ayuda con fechas |