checking if date field is null
Hello,
I'm trying to check if a DateTime field is null and eventually found that the following was returning the year 0001 when the DateTime field was null:
the following doesn't work because it will return '1' for a null DateTime entry:
bool taskExecuted = !string.IsNullOrEmpty(((DateTime)Report.GetColumnValue("Task.ExecuteTime")).ToString())
I eventually used this method which is working but feels wrong:
bool taskExecutedYearX = !((DateTime)Report.GetColumnValue("Task.ExecuteTime")).Year.ToString().Equals("1")
Is there a better way to check a nullable DateTime field in FR?
Thank you.