Ahsan Nadeem

Ahsan Nadeem

  • NA
  • 35
  • 892

Input string not in correct format

Mar 21 2017 1:00 AM
String dd = DateTime.Now.ToString("MM/dd/yyyy");
var BookingInfo = (from x in db.BookingInformations
where ((Convert.ToInt32(x.Date.ToString())) <= (Convert.ToInt32(dd.ToString())))
select x.Date)
 
I am comparing to date but every time I am getting error 'Input string not in correct format' 
What I am doing wrong? 

Answers (1)