Dear All,
The below mentioned line throw an exception that "The string was not recognized as a valid DateTime. There is an unknown word starting at index 0."
Actually this error is shown in my home pc where i am using window xp and visual 2010........... .........howeve r in my university lab on window 7 it works fine by passing second parameter as System.Globaliz ation.culturein fo.createspecif icculture("en-US").DateTimeFo rmat.Like:
Please anyone help me regarding this exception.:(
Hope you understand my question.
Thanks,
The below mentioned line throw an exception that "The string was not recognized as a valid DateTime. There is an unknown word starting at index 0."
Code:
DateTime dateTime = DateTime.Parse(date);
Code:
DateTime dateTime = DateTime.Parse(date, System.Globalization.CultureInfo.CreateSpecificCulture("en-US").DateTimeFormat);
Hope you understand my question.
Thanks,
Comment