Re: Formating Date Data Type?
От | Ashish Karalkar |
---|---|
Тема | Re: Formating Date Data Type? |
Дата | |
Msg-id | 004601c76c3d$9ce16310$170211ac@LIONKING.COM обсуждение исходный текст |
Ответ на | Formating Date Data Type? ("Ashish Karalkar" <ashish.karalkar@info-spectrum.com>) |
Список | pgsql-novice |
Thanks Michael , It works. With Regards Ashish.... ----- Original Message ----- From: "Michael Fuhr" <mike@fuhr.org> To: "Ashish Karalkar" <ashish.karalkar@info-spectrum.com> Cc: "Cesar Alvarez" <c.alvarezx66@gmail.com>; <pgsql-novice@postgresql.org>; "Phillip Smith" <phillip.smith@weatherbeeta.com.au> Sent: Wednesday, March 21, 2007 8:10 PM Subject: Re: [NOVICE] Formating Date Data Type? > On Wed, Mar 21, 2007 at 12:35:35PM +0530, Ashish Karalkar wrote: >> Tried with to_char but it does not take column name/actuall date >> value as argument for date > > Please show exactly what you tried and what the result was. Does > the following help? > > test=> create table test (d date); > CREATE TABLE > test=> insert into test values ('2007-04-15'); > INSERT 0 1 > test=> select to_char(d, 'DD-Mon-YYYY') from test; > to_char > ------------- > 15-Apr-2007 > (1 row) > > test=> select to_char('2007-4-15'::date, 'DD-Mon-YYYY'); > to_char > ------------- > 15-Apr-2007 > (1 row) > > -- > Michael Fuhr
В списке pgsql-novice по дате отправления: