View Single Post

   
  #2 (permalink)  
Old 04-09-2008, 05:50 PM
Michael Glaesemann
 
Posts: n/a
Default Re: Date style handling changes between 7.4.12 and 8.2.4


On Jun 12, 2007, at 4:04 , Adam Witney wrote:

> bugasbase_070529=# insert into date_test values('Wed Jul 11 10:51:14
> GMT+01:00 2001');
> ERROR: invalid input syntax for type date: "Wed Jul 11 10:51:14 GMT
> +01:00
> 2001"


> I have found date_trunc and extract in the docs,


Both date_trunc and extract work on date and timestamp datatypes.
What you are looking for is something to convert a string to a date:
to_date should work:

http://www.postgresql.org/docs/8.2/i...ormatting.html

Michael Glaesemann
grzm seespotcode net



---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org/

Reply With Quote