8

I know in mysql there is datetime type but couldn't find couterpart in postgresql. I know there is timestamp type in postgresql but that's a timestamp instead of datetime.

Thanks

3
  • 2
    It is called timestamp or timestamp with timezone. Commented Mar 21, 2020 at 17:53
  • Do you need to store values in the LOCAL time line (use TIMESTAMP), or WORLD time line (use TIMESTAMP WITH TIME ZONE)? Commented Mar 21, 2020 at 17:54
  • "that's a timestamp instead of datetime" makes no sense. Those two are literally the same thing Commented Mar 21, 2020 at 18:23

1 Answer 1

15

A MySQL DATETIME is equivalent to a PostgreSQL TIMESTAMP.

Both store a date+time value in an undefined time line. They assume the time offset or time zone is of no interest, or is defined by the application.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.