Error while using replace function

That’s because those headers don’t exist. Try item.Headers(“Date”)