Re: How to convert postgres timestamp to date: yyyy-mm-dd - Mailing list pgsql-general

From Vivek Khera
Subject Re: How to convert postgres timestamp to date: yyyy-mm-dd
Date
Msg-id 986B9CD2-F5CA-48FE-8BE4-4ACE742BD6D2@khera.org
Whole thread Raw
In response to Re: How to convert postgres timestamp to date: yyyy-mm-dd  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Responses Re: How to convert postgres timestamp to date: yyyy-mm-dd
List pgsql-general
On Mar 11, 2008, at 2:50 PM, A. Kretschmer wrote:

>> i.e ... WHERE pt.created_date >=  '2008-01-21'
>
> You can't compare a date or timestamp to a varchar or text. For your
> example, cast the date-string to a real date like:

Since which version of Pg?

Queries like the above have worked for me from 7.3 up thru 8.1, which
is my current production environment.



pgsql-general by date:

Previous
From: "Gauthier, Dave"
Date:
Subject: Array load from remote site through Perl/DBI
Next
From: Justin
Date:
Subject: Re: simple UPDATE statement...