Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id A2719634E93; Tue, 10 Mar 2009 09:14:21 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 27638-06-3; Tue, 10 Mar 2009 09:14:11 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-bw0-f170.google.com (mail-bw0-f170.google.com [209.85.218.170]) by mail.postgresql.org (Postfix) with ESMTP id 3E1C5634AE0; Tue, 10 Mar 2009 09:14:10 -0300 (ADT) Received: by bwz18 with SMTP id 18so2241491bwz.19 for ; Tue, 10 Mar 2009 05:14:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=c2YoWXZ82IrWnVEAoqy95CuytIGpqnPwg32cQf3/Um0=; b=YoVhV19qeC5uigE/IWiXUOq4fM8xe47MBXMv390yjV9DX3S+8PEZzXJYyKPTHWBoWP InSl0NcNeJTRpdVtYPF8YTm0emxeGoNqFeGA4oI7NmmGxjq5P0GV7aVB/loX5mK5SZRr kbk50o8dVmJqHA5XnPRMlzZ+AeEm8qxY0+s9g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=j+6wZPB22XlbnU1LUbP0pLOvWKKTbbZCwNVFmGLYWBoZK2ru36YdgzJBOB8smUG8L+ GqJOrVD7VTZxgTQ3mcvV9wjQPSfnIEJc2oz7Fl7PN1OB+tp43a8gD7jidgKvgbbiS+53 hwbcJQBVV0A1rrPaOIr2jGeNuSgH7yaalE+/c= MIME-Version: 1.0 Received: by 10.103.214.8 with SMTP id r8mr3210890muq.92.1236687248006; Tue, 10 Mar 2009 05:14:08 -0700 (PDT) In-Reply-To: <005901c9a178$d00c3c20$7024b460$@com> References: <005901c9a178$d00c3c20$7024b460$@com> Date: Tue, 10 Mar 2009 13:14:07 +0100 Message-ID: <162867790903100514u19ee4d0cje262cd98f213ae4a@mail.gmail.com> Subject: Re: [GENERAL] How to Convert VarChar to Date in PgSQL From: Pavel Stehule To: Venkat Rao Tammineni Cc: pgsql-general@postgresql.org, pgsql-admin@postgresql.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200903/129 X-Sequence-Number: 31629 hello 2009/3/10 Venkat Rao Tammineni : > Dear All, > > > > > > =C2=A0 I have one table which has lot of data.In the same table I have on= e > 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=3D# select to_date('2009-07-17', 'YYYY-MM-DD'); to_date ---------- 2009-07-17 (1 row) regards Pavel Stehule > > > > > ?Thanx & Regards > > =C2=A0Venkat Rao Tammineni > > GIS Developer > >