I'm trying to filter out data from the current date to last 3 years and trying to use this for spark sql query: (eg : d_date column format 2009-09-18
)
WHERE d_date >= DATEADD(MONTH, -3, GETDATE())
But getting following error.
Undefined function: 'DATEADD'. This function is neither a registered temporary function nor a permanent function registered in the database 'default'.;
Is there any DATEADD equivalent for spark SQL?