(And that's not even counting the awful take-home coding challenges that take multiple evenings or an entire weekend to complete.)
For a half day, allow it to be scheduled at least partly before/after standard work hours so that the candidate can just come in a bit late to their current job or leave a bit early - claiming a dentist appointment or similar.
If you don't respect my time, I'll assume that's a harbinger of how you'll treat me after hiring, and I'll walk away.