Usually, yes: The show lasted a half hour / half an hour. As an attributive adjective, however, only the first will do: It is a half-hour show. Use perhaps has to do with stress and ease of articulation in context: I'll meet you in half an hour.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.