Add below in your SQL query and it will get date difference and convert into years:
(DATEDIFF(MONTH,TABLE.BIRTH_DT,CURRENT_TIMESTAMP)/12)
The DATEDIFF() function returns the difference between two dates.
DATEDIFF(Interval, date_1, date_2)
DATEDIFF(Interval, date_1, date_2)
The CURRENT_TIMESTAMP() function returns the current date and time.
SELECT CURRENT_TIMESTAMP()
SELECT CURRENT_TIMESTAMP()
Comments
Post a Comment