Posted on: 3/17/2015 5:35:53 PM | Views : 655

I get an error when I run this code...Do I have the if statement set up correctly?
'Check to see if the Items are null or not If dr2.Item(20) & dr2.Item(21) Is DBNull.Value Then 'Leave it as it is Else 'Convert From Date and Time to just Date------------------------------------------------------- Dim createddate As String = String.Format("{0:MM/dd/yy}", Convert.ToDateTime(dr2.Item(20))) 'Convert From Date and Time to just Time Dim createdtime As String = String.Format("{0:hh:mm:ss tt}", Convert.ToDateTime(dr2.Item(21))) 'Created Date and Time lblcreated.Text = (createddate.ToString + (" " + createdtime.ToString)) '------------------------------------------------------------------------------------------------ ...

Go to the complete details ...