Re: How to Convert VarChar to Date in PgSQL

Поиск
Список
Период
Сортировка
От A. Kretschmer
Тема Re: How to Convert VarChar to Date in PgSQL
Дата
Msg-id 20090310121343.GC13749@a-kretschmer.de
обсуждение исходный текст
Ответ на How to Convert VarChar to Date in PgSQL  ("Venkat Rao Tammineni" <vtammineni@roulacglobal.com>)
Список pgsql-general
In response to Venkat Rao Tammineni :
> Dear All,
>
>
>
>
>
>   I have one table which has lot of data.In the same table I have one varchar
> filed. I want to convert into Date data type? Is It possible to convert varchar
> to date datatype with out loosing data.Please guide me.I am waiting for your
> great response.

Sure, if you have valid varchar-data.

to_date('2009-03-11'::text, 'yyyy-mm-dd');


Andreas
--
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net

В списке pgsql-general по дате отправления:

Предыдущее
От: Jaume Sabater
Дата:
Сообщение: Re: [ADMIN] How to Convert VarChar to Date in PgSQL
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: How to Convert VarChar to Date in PgSQL