“How to write an If-Then statement with DateTime function”
For some reason I can’t figure out how to write this.
The problem is when it returns Nil
The issue:
I put my DateTime.FromString code into a function (called DatSQLTest) with a return of a DateTime object.
I also put the code for exception handling in the function.
But it can return Nil.
My question is how do I write this so the function isn’t called twice.
The basics of the equation are:
Var dStr as string = “2005-01-01 12:00:00”//Actually any SQLDate
Var d1 as DateTime
d1 = DatSQLTest( dStr, CurrentMethodName )