Unix timestamp and mysql date: birthdate

Posted by Mikk on Stack Overflow See other posts from Stack Overflow or by Mikk
Published on 2010-04-15T00:01:14Z Indexed on 2010/04/15 0:03 UTC
Read the original article Hit count: 213

Filed under:
|
|
|

Hi, I have a really basic question concerning unix timestamp and mysql date. I'm trying to build a small website where users can register and fill in their birthdate.

Problem is that unix starts with Jan 01 1970. Now if i calculate age for users, form dates like date('m.d.Y', $unix_from_db) and so on it will fail with users older that 40 years, right?

So what would be the rigth way for doing this. Sorry, for basic question like this, but I'm inexperienced with php and mysql.

© Stack Overflow or respective owner

Related posts about unix

Related posts about php