Answer the question
In order to leave comments, you need to log in
How to store date of birth in database?
First, I immediately made storage in the form of unixtime. Then he remembered that his report went in the 70s. And what to do next with those who were born before the report.
Answer the question
In order to leave comments, you need to log in
Convert the column to DATE format (instead of DATETIME, TIMESTAMP).
Then he remembered that his report went in the 70s. And what to do next with those who were born before the report.
Calculations can also be made in the opposite direction using negative numbers. For example, the date October 4, 1957 00:00:00, which is 4472 days before the start of the countdown, is represented in Unix time by the number −4472 × 86400 = −386 380 800
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question