I’m using dropdown list for selecting time and convert to date time with date and time selected from the dropdown list
string dt = "21/08/2017";
if (DropDownList1.SelectedItem.Text == "8:30:00 AM")
{
DateTime date = DateTime.ParseExact(dt, "dd/MM/yyyy", null);
}
I want output as 2017-08-21 08:30:00.000 but I’m getting {8/21/2017 12:00:00 AM}
Can you please help me for the above request
Thanks in advance.