madhavi latha

madhavi latha

  • NA
  • 9
  • 670

Solution

Sep 25 2015 9:36 AM
Hi,
      In This below code
objReportsDTO.EndDate = Convert.ToDateTime(txtToDate.Text.Trim() != string.Empty ? txtToDate.Text.Trim() : null);
 
 
Getting this error
 

Server Error in '/TOLLPLUS' Application.

String was not recognized as a valid DateTime.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.FormatException: String was not recognized as a valid DateTime. 
 


Answers (2)