date in datagridview

During Saving
Dim D As Date
If Not IsDBNull(DataGridView.CurrentRow.Cells(4).Value) Then
D = CDate(DataGridView.CurrentRow.Cells(4).Value)
D = Now
End If
i dont want here D=now,if i comment it in the database it is saving as 01/01/1900,
i want null instead of that


  • seancampbellseancampbell Pennsylvania, USA
    Database Date fields cannot store Null values. That is why it comes in with a Year 1900.

    Hope this helps,
    Sean C
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion