Anil Kumar

Anil Kumar

  • 723
  • 1.3k
  • 133.5k

Unable to read date '1900-01-01' in sql server

May 30 2016 2:52 AM
 
SELECT * FROM WeekMaster WHERE CAST(GETDATE() AS DATE) BETWEEN CAST(DateFrom AS DATE) AND CAST(DateTo AS DATE)
AND CourseId=95
 
I am using above sql query for cast date and on the basis of this i get details from table but when i insert  '1900-01-01' as date in date column query  unable to read that raws field ?
 
please help if possiable or suggest me to resolve this 
 
 

Answers (4)