Set datetime to null
set datetime to null and convert datetime? to datetime
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Shakti Singh DulawatRank #668 · 3.6K reputationPosted Apr 21, 2016, 11:37 PM EDT
newdate = DateTime.Now.Date;
DateTime convertedDateTime = newdate ?? DateTime.Now;
Shakti Singh DulawatRank #668 · 3.6K reputationPosted Apr 21, 2016, 11:16 PM EDT
DateTime? nullDateTime = null;Minnu Merin Alex188 reputationPosted Apr 21, 2016, 11:24 PM EDT
Ranjit PowarRank #553 · 4.4K reputationPosted Apr 21, 2016, 11:33 PM EDT