calculate age in sql

Solutions on MaxInterview for calculate age in sql by the best coders in the world

showing results for - "calculate age in sql"
Isabelle
18 Jan 2018
1#THIS IS FOR POSTGRES
2# You can use the AGE function. The AGE function requires two arguementS.
3# AGE(late date, early date). The NOW() function returns the current timestamp.
4
5AGE(NOW(), date_of_birth) AS age
6
7#Since NOW() is a timestamp, the result will be like this:
8# 45 years 2 months 15 days 21:43:05.378372
9#You can then use this to extract the age.
10
11LEFT(age, STRPOS(age,' ')) 
queries leading to this page
how to count age from date of birth in sqlcalculate age sql oraclesql get age from birth dateage calculation using date of birth in sql employeehow to calculate age in sqlsql query to find age from dobcalculate age from birthdate sqlquery to find age from date of birth in sqlhow to calculate age from date of birth in sqlcalculating age from birthdate sqlt sql calculate age from date of birthsql query to calculate age from date of birthget age from date of birth sqlcentralcalculating average age sql from birthdatecalculate age in years in sqlage calculation using date of birth in sqlsql get minimum birth date agehow to get age from birthday in sqlsql server get age from birthdatesql server calculate exact agesql calculate agesql derive age from date of birthsql calulate agesql agehow to find age in sqlget age from date sqlage function sqlcalculate age in sqlget age from birthdate sqlhow to calculate age from date of birth in sql querysql age cal sql server age calculationhow to get age from birthdate in sqlget the age from birthdate sqlsql server calculate age from birthdatecalculate date of birth sql calculate age from date of birth in sqlsql query age from date of birthget age from date of birth sqlage in months in sqlconvert date to age in sqlt sql calculate age from date of birthsql server get agesql calculate person agesql calculate age from datehow to calculate an age in sql query calculate age sql server examplehow to find age in a sql datebasecount age in sqlsql find age with datefind age from date of birth in sqlage in months sqlsql statment to calculate ageget age sqlcompute age give date of birth sqlhow to find age in sql with dobhow to get age from date of birth in sqlsql select age from date of birthsql get age from datecalculate age in sql serverage from date of birth sqlhow to calculate age in ms sql servercalculate age in dbt sqlage from dob sqlcalculating age from date of birth in sqlcalculating age from date of birth and event date in sqlsql query to get age from date of birthcalculate age from dob in sqlcalculate age in sql