Answers for "how to datetime null"

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

Code answers related to "how to datetime null"

C# Answers by Framework

Browse Popular Code Answers by Language