PHP and MySQL smallest and largest possible date

后端 未结 6 575
挽巷
挽巷 2021-01-18 06:42

What is the largest date PHP and MySQL recognizes?

I mean, I have different values for different timeline and I want to make them all as BETWEEN selects

6条回答
  •  日久生厌
    2021-01-18 06:53

    MySQL's DATETIME type supports from "1000-01-01" to "9999-12-31". That should be sufficient.

    PHP can analyze those as well; they aren't two digit years, so it's good. I just ran strtotime on 9999-01-01 and it worked.

提交回复
热议问题