how to check datetime has unassigned or default value?
beginer
1544
Points
52
Posts
|
Is there any way apart from following?
|
Answers
Priya
1194
Points
33
Posts
|
If you have a DateTime object, then the default value is DateTime.MinValue, and hence you have to check it like this:
If the DateTime object is nullable, then here is a different story:
Posted On:
06-Jul-2021 05:33
Thanks. - beginer 19-Jul-2021 21:21
|
Smith
2890
Points
78
Posts
|
We can create extension method to check empty or unassigned datetime object as
And can be used as:
Posted On:
07-Jul-2021 00:18
Thanks. - beginer 19-Jul-2021 21:21
|
Blog
Active User (0)
No Active User!