I have a calendar control:
<asp:Calendar ID="cldDepartDate" runat="server"></asp:Calendar>
And for example, if I chose 14th of March 2019, using the code below to display:
lblTest.Text = cldDepartDate.SelectedDate.ToString()
I got "3/14/2019 12:00:00 AM"
And now I want to convert it to "14/3/2019 12:00:00 AM" and store it into a Date object.
So far I have tried:
Dim oDate As Date = Date.ParseExact(cldDepartDate.SelectedDate.ToString("dd/MM/yyyy"), "MM/dd/yyyy", CultureInfo.InvariantCulture)