Click here to Skip to main content
16,012,110 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
format exception was handled by user code...string was not recognised as a valid Date Time..i m getting this error..


string[] a = new string[] { "dd/MM/yyyy", "MM/dd/yyyy", "MM/dd/yy", "ddMMMyyyy", "dMMMyyyy","dd-MM-yyyy","MM-dd-yy","MMM dd" };
result = DateTime.ParseExact(dateString, a, System.Globalization.CultureInfo.CurrentCulture, System.Globalization.DateTimeStyles.None);


can anyone help me pls..
Posted

1 solution

The error is written in plain english. What do you think it means ? dateString is not a valid date time.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900