Working with timestamps and Unix Time

Поиск
Список
Период
Сортировка
От Kirby Krueger
Тема Working with timestamps and Unix Time
Дата
Msg-id LHEPILOHLNIGBPAOJMNJKEMOCBAA.kirbyk@idiom.com
обсуждение исходный текст
Ответы Re: Working with timestamps and Unix Time  (Andrew McMillan <andrew@catalyst.net.nz>)
Список 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 по дате отправления:

Предыдущее
От: "Nikh Nath"
Дата:
Сообщение: Re: Unable to use COPY..FROM with NULL numeric fields
Следующее
От: Andrew McMillan
Дата:
Сообщение: Re: Working with timestamps and Unix Time