G
Guest
Hello Everyone and thanks for your help in advance. I am developing an application that utilizes a separate class library for data access to a SQL Server database. One of the tables has several fields defined as DateTime. The data access layer exposes properties for each field in the table. In the instance of datetime fields, the class returns a property of date type. The problem occurs when one of the datetime fields is NULL, which results in a value of 12:00:00 AM being returned. I then tried the following code
If Not IsDBNull(myclass.mydate) the
myTextbox.Text = myClass.myDat
Els
mytextbox.Text = "
End I
However, it still returned the 12:00:00 AM. Is there any way around this problem other than returning a string value, that converting it is datetime functions are required? Any help would be greatly appreciated. Thanks.
If Not IsDBNull(myclass.mydate) the
myTextbox.Text = myClass.myDat
Els
mytextbox.Text = "
End I
However, it still returned the 12:00:00 AM. Is there any way around this problem other than returning a string value, that converting it is datetime functions are required? Any help would be greatly appreciated. Thanks.