Answers for "how to convert nullable datetime datarow to datetime in 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

Code answers related to "how to convert nullable datetime datarow to datetime in c#"

C# Answers by Framework

Browse Popular Code Answers by Language