Rashmi Saini

Rashmi Saini

  • 1.3k
  • 397
  • 24.9k

Convert.ToDateTime() not working on Server. Format Exception

Dec 23 2016 2:54 AM
TxtPolCreatedDate.Text = Convert.ToDateTime(TxtPolCreatedDate.Text).ToString("dd/MMM/yyyy");
Its working fine on local machine but not working on server . I have also checked for the Date.Parse() and specify culture as suggested on
https://msdn.microsoft.com/en-us/library/9xk1h71t(v=vs.110).aspx.
But not working..
It gives error :  "String was not in Correct Format"

Answers (4)