Re: [GENERAL] How to Convert VarChar to Date in PgSQL - Mailing list pgsql-admin

From Pavel Stehule
Subject Re: [GENERAL] How to Convert VarChar to Date in PgSQL
Date
Msg-id 162867790903100514u19ee4d0cje262cd98f213ae4a@mail.gmail.com
Whole thread Raw
In response to How to Convert VarChar to Date in PgSQL  ("Venkat Rao Tammineni" <vtammineni@roulacglobal.com>)
List 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 by date:

Previous
From: Jaume Sabater
Date:
Subject: Re: How to Convert VarChar to Date in PgSQL
Next
From: Pavel Stehule
Date:
Subject: Re: [GENERAL] How to Convert VarChar to Date in PgSQL