From: A. Kretschmer <andreas.kretschmer@schollglas.com>
To: pgsql-general@postgresql.org
Subject: Re: How to Convert VarChar to Date in PgSQL
Date: Tue, 10 Mar 2009 13:13:43 +0100
Message-ID: <20090310121343.GC13749@a-kretschmer.de> (raw)
In-Reply-To: <005901c9a178$d00c3c20$7024b460$@com>
References: <005901c9a178$d00c3c20$7024b460$@com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: andreas.kretschmer@schollglas.com, pgsql-general@postgresql.org
Subject: Re: How to Convert VarChar to Date in PgSQL
In-Reply-To: <20090310121343.GC13749@a-kretschmer.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox