4
Answers

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

Rashmi Saini

Rashmi Saini

8y
3.6k
1
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)