I want to parse a date-time string into a DateTime data type.
The format of the string is like 08/10/2013 09:49 PM, and I want it to go to the form 2013-10-08 21:49:05.6500000
The following is my code but it's not working.
public static DateTime ConvertDateTime(String arg_dateTime)
{
try
{
return DateTime.ParseExact(arg_dateTime,
"dd/MM/yyyy H:m:s fff",
System.Globalization.CultureInfo.InvariantCulture);
}
catch(Exception exp)
{
return DateTime.Now;
}
}