Make datetime nullable to avoid error about conversion of datetime2 to datetime.