Abhishek  Jaiswal

Abhishek Jaiswal

  • 95
  • 19.8k
  • 9.6m

SQL server ERROR

Aug 28 2014 9:39 AM
AM getting this error while performing this query operation

Msg 241, Level 16, State 1, Line 1
Conversion failed when converting date and/or time from character string.

here' s my query

SELECT 
 MaxDate,
 MinDate,
DATEDIFF(D, MaxDate, MinDate)
FROM (
SELECT
     (SELECT MAX(TDate) ) AS MaxDate
    ,(SELECT MIN(TDate) ) AS MinDate
FROM EDATA
)a


Answers (4)