Cannot assign from type 'System.Object' to type 'System.Nullable`1[System.DateTime]'

@krishnaa1

Are you trying to assign value directly or declaring a variable first then assign nothing to is and then assign this variable to entity?

When we directly try to assign value nothing/null we get this error. try declaring a variable and then assign that variable.