I have two strings:
string one = \"13/02/09\";
string two = \"2:35:10 PM\";
I want to combine these two together and convert to a Dat
Use string two = "02:35:10 PM";
instead of string two = "2:35:10 PM";
and also hh
instead of HH
due to AM/PM format.
Below is the code:
string one = "13/02/09";
string two = "02:35:10 PM";
DateTime dateTime = DateTime.ParseExact(one + " " + two, "dd/MM/yy hh:mm:ss tt", CultureInfo.InvariantCulture);