What cells are those dates/times in?

Post the exact formula you tried that returns the #NAME? error.