C
craigkenisston
I have a generic function that receives a couple of datetime values to
work with. They can or cannot have a value, therefore I wanted to use
null. This function will call a database stored procedure and must save
either a null or a real date.
However, passing a hardcoded "null" to call this function causes a
compilation error :
cx.cs(136): Argument '16': cannot convert from '<null>' to
'System.DateTime'
So, the question is how one should handle null dates ? What's the
common approach ?
May be use the datetime.minvalue as a meaning of "null" ?
work with. They can or cannot have a value, therefore I wanted to use
null. This function will call a database stored procedure and must save
either a null or a real date.
However, passing a hardcoded "null" to call this function causes a
compilation error :
cx.cs(136): Argument '16': cannot convert from '<null>' to
'System.DateTime'
So, the question is how one should handle null dates ? What's the
common approach ?
May be use the datetime.minvalue as a meaning of "null" ?