I am trying to see whether a Person was older than a certain age at a specific point in time.
So currently specificTime is a DATETIME attritube and it has a value of '2011-05-21'
The Age is also a DATETIME attribute.
Does anyone have any ideas to a query that will determine whether the Age of a person is greater than 15 years old at the specificTime
try
select * from Person where (datediff(specificTime,Age) / 365) > 15
For more details on datetime functions refer http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_datediff
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With