I need a little help implementing a solution when my program is reading a 3rd party database that might be missing a date null or empty or not be in a vlaid datetime format that can be parsed.

My program reads a 3rd party text file database using text field parser then I create a new column and fill it with data by parsing in the following way:

With dtlist
.Columns.Add("NewListPrice", GetType(Double))
.Columns.Add("NewListDate", GetType(DateTime))
.Columns.Add("NewAddress")
.Columns.Add("DaysMarket", GetType(Int16))
Dim dtrow As DataRow
For Each dtrow In dtlist.Rows()
Dim StrNum As String = dtrow.Item(Form10.add_Num_txt.Text).ToString
Dim StrName As String = StrConv(dtrow.Item(Form10.add_Str_txt.Text).ToString, VbStrConv.ProperCase)
Dim UnitNum As String = dtrow.Item(Form10.add_unit_txt.Text).ToString
Dim St As String = dtrow.Item(Form10.add_state_txt.Text).ToString
Dim Zip As String = dtrow.Item(Form10.add_zip_txt.Text).ToString
Dim City As String = StrConv(dtrow.Item(Form10.add_city_txt.Text).ToString, VbStrConv.ProperCase)
Dim Words() As String = Split(City, "(")
Dim revCity As String = Words(0)
dtrow("NewAddress") = StrNum + " " + StrName + " " + UnitNum + " " + City + "," + " " + St + " " + Zip
dtrow("NewListDate") = DateTime.Parse(CStr(dtrow.Item(Form10.ld_txt.Text)))
dtrow("DaysMarket") = Integer.Parse(CStr(dtrow.Item(Form10.dom_txt.Text)))
dtrow("NewListPrice") = Double.Parse(CStr(dtrow.Item(Form10.lp_txt.Text)))
Next dtrow



I need a solution for when a field in the 3rd party textfile is empty. I recently encountered a problem when a DateTime field was empty. I would like the program to make the user aware the field was empty but also continue to run. I am not sure what they best way to do this would be. I was reading about tryparse, still a bit confused on implementing it though and not sure if that the best way for my over goal.

Ideally it might be nice to let the user know one of the fields was empty and insert a 01/01/0000 or something similiar date so the program can continue but the data would be obvious to the user is in correct.

does anyone of any good practical ideas and possible solutions?

Thank