DataContext.ExecuteCommand("DELETE from Table WHERE Date < Now()");
I get an error about how Now() is not a recognized built in function name.
DataContext.ExecuteCommand("DELETE from Table WHERE Date < Now()");
I get an error about how Now() is not a recognized built in function name.
When you send your SQL query directly to SQL Server, you need to use the SQL Server functions - not the .NET ones.
Use this instead:
DataContext.ExecuteCommand("DELETE from Table WHERE Date < GETDATE()");
GETDATE()
is the T-SQL equivalent for Now()