Working with timestamps and Unix Time - Mailing list pgsql-novice

From Kirby Krueger
Subject Working with timestamps and Unix Time
Date
Msg-id LHEPILOHLNIGBPAOJMNJKEMOCBAA.kirbyk@idiom.com
Whole thread Raw
Responses Re: Working with timestamps and Unix Time  (Andrew McMillan <andrew@catalyst.net.nz>)
List pgsql-novice
A quick question:

I have a field of type 'Timestamp'.  I want to extract it in Unix Epoch Time
format (ie, seconds since Jan 1, 1970.)  What's the syntax to do this in
Postgres?

And, similarly, when I'm done it'd be awfully convenient if I could stick
that number right back into the timestamp field.  Looking at the
documentation, I bet it'll understand it, but does anyone know if there's
any trick to doing this?

Thanks for any help!

-- Kirby


pgsql-novice by date:

Previous
From: "Nikh Nath"
Date:
Subject: Re: Unable to use COPY..FROM with NULL numeric fields
Next
From: Andrew McMillan
Date:
Subject: Re: Working with timestamps and Unix Time