Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

mysql calculate age

SELECT DATEDIFF(CURRENT_DATE, STR_TO_DATE(t.birthday, '%d-%m-%Y'))/365 AS ageInYears
  FROM YOUR_TABLE t 
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #mysql #calculate #age
ADD COMMENT
Topic
Name
3+9 =