[RESOLVED] String was not recognized as a valid DateTime.
Hai
i am working with Windows applications in c#. i am working with Dates for my application. when i changed the settings in the machine to canada i am getting an error "String was not recognized as a valid DateTime.".
i am taking the data in DataView.There i can see the datecolumn with "21/03/06"
But when i am filtering the row with "21/03/06" date it is showing the above error "String was not recognized as a valid DateTime."
Please suggest me any solution if u have
Thanks and Regards
Vinay Kumar
Re: String was not recognized as a valid DateTime.
I would guess that Canada use M/dd/yyyy format, so that string represents the third day of twenty-first month, which is obviously not a valid date. You cannot convert a date to a string using one format then expect to convert it back using a different format.
Re: String was not recognized as a valid DateTime.
Thank you for the suggestions
i am converting the date to mm/dd/yy format
Thanks and Regards
Vinay Kumar