I'm trying pull the year out of the date field, CPARS.[Add Date]. The format is (MM/DD/YYYY). It is giving me a "compile error in query expression year.(CPARS.[Add Date])". Why might it be doing this?
SELECT CPARS.ID, YEAR(CPARS.[Add Date])
FROM CPARS
Ive tried all the other date functions: year, month, day, datepart, datediff in many examples and I still get a compile error. The data type is Date/Time.
Out of curiosity I attempted the count function and it worked perfectly. All date functions are not working.