The Vertica Forum recently got a makeover! Let us know what you think by filling out this short, anonymous survey.
Please take this survey to help us learn more about how you use third party tools. Your input is greatly appreciated!
How old am I?
![[Deleted User]](https://us.v-cdn.net/6029397/uploads/defaultavatar/nD0LWW9MQTB29.jpg)
Jim Knicely authored this tip.
The AGE_IN_YEARS function returns the difference in years between two dates, expressed as an integer. This function is very useful when I forget how old I am or how old my wife is being that today is my wife’s birthday.
Example:
dbadmin=> SELECT extract(year from sysdate) "Current Year", age_in_years('04/05/1987') "How young does my wife think she is?"; Current Year | How young does my wife think she is? --------------+-------------------------------------- 2018 | 30 (1 row)
Have Fun!
0