Hi
DateTime? dtFrom = null;
DateTime PMDate2 = DateTime.ParseExact(ddlDates.SelectedItem.Value, "dd-MM-yyyy", System.Globalization.CultureInfo.InvariantCulture);
dtFrom = Convert.ToDateTime(PMDate2.ToString("yyyy-MM-dd"));
Thanks
Vishal YelvePosted Sep 19, 2022, 7:57 AM
Try this, hope this might help.