0

I inserted date (timestamp unix format) into postgres table using php. here below is the field structure.

last_dwnld
(bigint)
-----------
1408788007
1408190322

Field data type is bigint and its contain timestamp. field name is last_dwnld.

please let me know how to extract date using postgres query. last_dwnld::DATE is not helping here.

1
  • Consider converting that column to a timestamp column. Commented Apr 21, 2016 at 10:11

1 Answer 1

1

Postgres's internal to_timestamp function handles this (since 8.1)

Select to_timestamp(1408788007); -- 2014-08-23 10:00:07+00
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.