KB Issue
Using date format in SQL Server with the wrong interval will give the error that Invalid parameter 1 specified for datediff.
Issue Details
When running code in SQL Server, you may encounter the following error.
Microsoft OLE DB Provider for SQL Server error '80040e14'
Invalid parameter 1 specified for datediff.
/Load.asp, line 115
Recreate Issue
In an Access Database, we use the following code with DateDiff to format dates or times.
DATEDIFF('s', LoadDate, now()) as timestamps
Copy
Search Site
Search Google
Resolve Issue
Unlike in Microsoft Access database, in SQL Server we use the entire word, instead of its letter.
In SQL Server, we use the following code with DateDiff to format dates or times.
DATEDIFF(second, LoadDate, getdate()) as timestamps
Copy
Search Site
Search Google