SQL 2000 DateDiff

Results 1 to 2 of 2

Thread: SQL 2000 DateDiff

  1. #1
    Join Date
    Dec 1969

    Default SQL 2000 DateDiff

    Can anyone tell me why my database would give me this error? "Invalid parameter 1 specified for datediff"<BR>Here is my query..<BR>UPDATE vw_All<BR>SET Total_Downtime = DATEDIFF(&#039;second&#039;, Time_Down, Time_Up)<BR>It automatically puts those single quotes around second, and the other two are fields that have integer values.

  2. #2
    Join Date
    Dec 1969

    Default NO single quotes

    SQL Server does not take single quotes in DateDiff<BR><BR>eg <BR>DATEDIFF(day, pubdate, getdate()) <BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts