String was not recognized as a valid DateTimePUPandu Umapathy14yAsked May 2, 2012, 11:18 AM2.1kLearn iOS ProgrammingHi All,How to resove the issue String was not recognized as a valid DateTime
Kunal Vaishya14y agoPosted May 2, 2012, 2:04 PMDateTime date = DateTime.ParseExact(this.Text, "dd/MM/yyyy", CultureInfo.InvariantCulture);
MMMuthuMari M14y agoPosted May 2, 2012, 1:20 PMHi,Try using DateTime.ParseExact.this.Text="22/11/2009";DateTime date = DateTime.ParseExact(this.Text, "dd/MM/yyyy", null);thanks.If this post is useful then mark it as "Accepted Answer"
Vulpes14y agoPosted May 2, 2012, 11:33 AMWhat is the string that you're trying to parse to a DateTime and what is your current culture?
Kunal VaishyaPosted May 2, 2012, 2:04 PM
MuthuMari MPosted May 2, 2012, 1:20 PM
Try using
DateTime.ParseExact.thanks.
If this post is useful then mark it as "Accepted Answer"
VulpesPosted May 2, 2012, 11:33 AM