Tag Archives: Null DateTime from SQL to C# code

Reading null values from datatabase in C# code

If you tried reading a null value from the database such as a null date, you might have across this exception Specified cast is not valid Casting Nullable Values The following code works unless a null datetime is returned. Note … Continue reading

Posted in Troubeleshoot | Tagged , , , , | Leave a comment