I want to convert a nullable DateTime (DateTime?) to a DateTime, but I am getting an error:
DateTime?
DateTime
Cannot implicitly convert type
Consider using the following which its far better than the accepted answer
DateTime UpdatedTime = _objHotelPackageOrder.UpdatedDate == null ? DateTime.Now : (DateTime)_objHotelPackageOrder.UpdatedDate;