Search code examples
ssisexpressionetldatediffderived-column

Calculate age using DOB column


I have dob column how can i calculate age by using DOB column in derived column ? I tried using as below but this throws an error .

 datediff(yy, Dob,getdate()) 

Solution

  • Try using the following expression:

    DATEDIFF("yy" , [DOB], GETDATE())
    

    References: