hello frnds i having one datetimepicker for mfgdate and another datetimepicker for expdate can any one help me to get code for validating i.e. if the mfgdate is greater than expdate then error msg should be displayed else contiue..
plz help me thnks

Hi,

You can try something like this:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If DateTimePicker1.Value > DateTimePicker2.Value Then
            MsgBox("Wrong Date")
        Else
            MsgBox("Good Date")
        End If
    End Sub
commented: agree +13