Skip to content
Advertisement

Tag: date-arithmetic

how to find Age from DOB in Athena?

Here is my query to find out age from the DOB column : I am getting following error: SYNTAX_ERROR: line 4:47: ‘-‘ cannot be applied to varchar, varchar Appreciate your help! Answer You should be able to solve this using function DATE_DIFF(). From the documentation: date_diff(unit, timestamp1, timestamp2) → bigint Returns timestamp2 – timestamp1 expressed in terms of unit. Try:

Advertisement