S
Steve via .NET 247
I have been trying to update dates and times in an access database using VB .NET.
I use the parse and format events of a data binding to set the required format for the field. This works fine for dates but when I store times I get the current date inserted as well.
The parse and format events both point to the same time formatting function which is:
Private Sub TextBoxTime_Format(ByVal sender As Object, ByVal e As ConvertEventArgs)
If e.Value.ToString() = "" Then
e.Value = DBNull.Value
Else
e.Value = Format(e.Value.ToString, "Short Time")
End If
End Sub
What's going wrong?
Cheers, Steve
I use the parse and format events of a data binding to set the required format for the field. This works fine for dates but when I store times I get the current date inserted as well.
The parse and format events both point to the same time formatting function which is:
Private Sub TextBoxTime_Format(ByVal sender As Object, ByVal e As ConvertEventArgs)
If e.Value.ToString() = "" Then
e.Value = DBNull.Value
Else
e.Value = Format(e.Value.ToString, "Short Time")
End If
End Sub
What's going wrong?
Cheers, Steve