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

From Adam Rich
Subject Re: How to convert postgres timestamp to date: yyyy-mm-dd
Date
Msg-id 018b01c883a4$ce984520$6bc8cf60$@r@sbcglobal.net
Whole thread Raw
In response to How to convert postgres timestamp to date: yyyy-mm-dd  (CaseT <ctorres@quantumcomposers.com>)
List pgsql-general
> I need to convert postgres timestamp to date format yyyy-mm-dd in a
> sql statement.
> pt.created_date below is timestamp format
>
> i.e ... WHERE pt.created_date >=  '2008-01-21'
>
> Any help would be greatly appreciated.

Try this:

WHERE pt.created_date >= '2008-01-21'::date






pgsql-general by date:

Previous
From: "A. Kretschmer"
Date:
Subject: Re: basic plpgsql / sql funtion question
Next
From: Tim Child
Date:
Subject: ERROR: text search configuration "pg_catalog.english" does not exist