CFF KB - Carrz-Fox-Fire Promotions Knowledge Base

CFF KB is all about 1 thing: The Sharing of Knowledge and the Power we gain from it.
  • Breadrumbs:
  • Microsoft OLE DB Provider for SQL Server error '80040e14' - Invalid parameter 1 specified for datediff.

  • CFF Knowledge Base - Share With Facebook CFF Knowledge Base - Share on Twitter CFF Knowledge Base - Share on Reddit CFF Knowledge Base - Share on Digg It CFF Knowledge Base - Share on Stumble Upon It CFF Knowledge Base - Share on Delicious
    Share With Friends (Updated 6-8-2010)
  • Article ID:
    4245
  • Date Created
    Thursday, April 21, 2022
  • Last Updated
    Thursday, April 21, 2022
  • This Article Has been Viewed
    465 times
  • Short Desc

    Using date format in SQL Server with the wrong interval will give the error that Invalid parameter 1 specified for datediff.
  • Article 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 Access Database we use the following code with DateDiff to format our date or time.
    DATEDIFF('s', LoadDate, now()) as timestamps
  • 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 our date or time.
    DATEDIFF(second, LoadDate, getdate()) as timestamps