Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

age postgres

#Code language: SQL (Structured Query Language) (sql)
SELECT age(CAST (day_of_birth AS timestamp)) AS Age;
--0 years 0 months 0 days
SELECT (CURRENT_DATE - CAST(day_of_birth AS date))/365 age;
--0 (age_in_years)
Source by www.postgresqltutorial.com #
 
PREVIOUS NEXT
Tagged: #age #postgres
ADD COMMENT
Topic
Name
7+6 =