Answers for "nullable dates c#"

C#
1

how to convert nullable datetime datarow to datetime in c#

object sqlDateTime = sqldatareader[0];
DateTime? dt = (sqlDateTime == System.DBNull.Value)
    ? (DateTime?)null
    : Convert.ToDateTime(sqlDateTime);
Posted by: Guest on November-09-2020

C# Answers by Framework

Browse Popular Code Answers by Language