I am trying to store in MySQL a date() field a successive date to the year 2037.
For example: 2065-12-01
Problem is that the field is returning: 1969-12-31
What is the correct way to record these values on DB? Should I use VARCHAR?
I compute the date
field's value like this:
$future_date = date('Y-m-d', strtotime("+$number_years_to_add years"));
DATE
type works fine here, are you running some antique MySQL version or something? Also, how exactly are you setting it? – Analects