On Mon, Aug 14, 2006 at 08:00:59AM -0400, Mike Ellsworth wrote:
hi,
> Is there a way to convert data type `datetime` into an integer
> (unix_timestamp) while doing ALTER COLUMN `column_name` TYPE int4
> USING CAST(`column_name` as integer) ...... something like this?
i dont know, if it solves your problem - for reading i usually cast like
this:
EXTRACT(EPOCH FROM ts) as ts
and for writing:
ts::int4::abstime::timestamp
--
cu