Hello, I need to get the difference between two dates using the select DATEDIFF(year, 1997-01-01, getdate()) function select DATEDIFF(year, 1997-01-01, getdate()) but the function returns an select DATEDIFF(year, 1997-01-01, getdate()) value, the function that calculates the year from the date (i.e. the 2nd argument ), if we execute the year function (1997-01-01) then it will return 1905, in my table there is a DateOfBurn field and its date (when I fill in, I just enter "1990-02-02") and there is a calculated column Age DATEDIFF(year, DateOfBurn, getdate()) Help please make the request correctly.
|
'1997-01-01'in quotes (single). But since 1997-01-01 = 1995 and how it will be converted to the date of the mind I will not attach - Mikeselect year(getdate())- nick_n_a