I have the following code, works fine when the user adds a date but if they dont I get .....
String was not recognized as a valid DateTime
If String.IsNullOrEmpty(FlxHeader(FlxHeader.SelectedIndex, 4).ToString) Then
querypart = ""
querypart = Format(Convert.ToDateTime(FlxHeader(FlxHeader.SelectedIndex, 4).Text), "yyyy-MM-dd").ToString
How can I get around this? The SQL server database is set to allow nulls.
Visual Basic.NET.NET Programming
8/22/2022 - Mon
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!