Re: [GENERAL] How to Convert VarChar to Date in PgSQL

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: [GENERAL] How to Convert VarChar to Date in PgSQL
Дата
Msg-id 162867790903100514u19ee4d0cje262cd98f213ae4a@mail.gmail.com
обсуждение исходный текст
Ответ на How to Convert VarChar to Date in PgSQL  ("Venkat Rao Tammineni" <vtammineni@roulacglobal.com>)
Список pgsql-admin
hello

2009/3/10 Venkat Rao Tammineni <vtammineni@roulacglobal.com>:
> 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.
>
>
>

use function to_date, please

 http://www.postgresql.org/docs/8.3/static/functions-formatting.html

postgres=# select to_date('2009-07-17', 'YYYY-MM-DD');
 to_date
----------
2009-07-17
(1 row)

regards
Pavel Stehule

>
>
>
>
> ?Thanx & Regards
>
>  Venkat Rao Tammineni
>
> GIS Developer
>
>

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

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