I am using HiveQL and I need to calculate the age just by using the Date of birth column but the issue is GetDate
doesn’t work however Current_Date()
does. The example I am trying is
datediff(yy,Dateofbirthcol,current_date()) As Age
.
The DOB column looks like 1988-12-14
.