I want to compare just the date part (and Not the time) of two VB.NET Date objects. Is there a way to do that?
Dim date1, date2 As Date
date1 = Date.Parse(dtpStart.Text)
date2 = Date.Parse(dtpEnd.Text)
If (DateTime.Compare(date1, date2) > 0) Then ' which means ("date1 > date2")
MessageBox.Show("يجب تحديد الفترة للتاريخ بشكل صحيح ", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MessageBoxOptions.RtlReading)
Exit Sub
End If