I am currently setting the date field to a Datetime.Now which is being done through the SQL query on the database.
I do a
SELECT NVL(mydatefield, sysdate) FROM myView;
This is not the most elegant approach I can think of. The better practice would be to check for a NULL. I found that the DateTime class does not support the syntax that I am using for int values.
What approaches have you seen being used? What's your preference? How can you make a DateTime handle null values?
I don't want the DateTime.ParseExact
in my front-end code to throw an exception.