Jump to content

How to generate a timestamp based on age?


Agtronic

Recommended Posts

Hey guys and gals,

 

I have a database that contains user profiles. Users' date of birth are stored as unix timestamps, many of which are in the negative. I am able to calculate the age of the users once the timestamp has been pulled from the DB.

 

What I'd like to do is pull users between the ages of (say) 40 and 50 years old.

 

Question : How can I generate a timestamp value based on age so that I can use it in the MySQL query string?

 

Any help would be greatly appreciated!

 

Thank you for your time!

 

 

Link to comment
https://forums.phpfreaks.com/topic/97669-how-to-generate-a-timestamp-based-on-age/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.