From: | "Agustin Casiva" <casivaagustin(at)gmail(dot)com> |
---|---|
To: | pgsql-es-ayuda(at)postgresql(dot)org |
Subject: | Re: Formato de fecha en español |
Date: | 2006-07-06 14:57:29 |
Message-ID: | 646eb5870607060757k387908e4m79e2e5aa9d3e77db@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-es-ayuda |
Con el comando set podes cambiar el formato de la fecha.
Para ver los formatos tenes
http://www.postgresql.org/docs/7.4/interactive/datatype-datetime.html
Sino lo que podes hacer es separar el mes, año y el dia de la fecha completa
con
EXTRACT (*field* FROM *source*)
day
The day (of the month) field (1 - 31)
SELECT EXTRACT(DAY FROM TIMESTAMP '2001-02-16 20:38:40');
*Result: *16
month
For timestamp values, the number of the month within the year (1 - 12) ; for
interval values the number of months, modulo 12 (0 - 11)
SELECT EXTRACT(MONTH FROM TIMESTAMP '2001-02-16 20:38:40');
*Result: *2
SELECT EXTRACT(MONTH FROM INTERVAL '2 years 3 months');
*Result: *3
SELECT EXTRACT(MONTH FROM INTERVAL '2 years 13 months');
*Result: *1
year
The year field
SELECT EXTRACT(YEAR FROM TIMESTAMP '2001-02-16 20:38:40');
*Result: *2001
Despues podes armar el string que vos querias,
Saludos
--
Agustin Casiva - Desarrollador de Sistemas
www.casivaagustin.com.ar
casivaagustin(at)gmail(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Pablo Siciliano | 2006-07-06 15:10:11 | Réplica con Slony |
Previous Message | Cecilia Arruzazabala | 2006-07-06 14:11:47 | Re: Formato de fecha en español |