Simple,
If datetimepicker1.text > datetimepicker2.text then
Messagebox.show("From Date must be before To Date!", "Date Error", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
...and you could also have it so that the user can't set the To Date before the From Date.
If datetimepicker2.text < datetimepicker1.text then
Messagebox.show("To Date must be after From Date!", "Date Error", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
...HTH
Luke
PS, you would need to replace your monthPickers with dateTimePickers