i have varchar column text formatted "sun aug 07 17:43:55 +0000 2011" how convert column in postgresql date datatype?
postgresql understands timestamp format fine. can use cast.
regress=> select cast('sun aug 07 17:43:55 +0000 2011' timestamp); timestamp --------------------- 2011-08-07 17:43:55 (1 row)
to date, no time component, can cast straight date
instead of timestamp
.