Quick answer
¿Qué hora es?
the everyday version
¿Tienes hora?
the alternative — see below for when
Which one to use
You ask ¿qué hora es? in the singular, even though the answer normally comes back plural: son las dos, son las nueve y media.
One o’clock is the exception, because it is a single hour: es la una, with a singular verb and a singular article. Everything from two onwards uses son las. To ask a stranger politely, ¿tienes hora? or the formal ¿tiene hora? is more natural than the bare question. Minutes are added with y, and subtracted with menos.
All the versions
Where you are matters
The structure is the same everywhere; in parts of Latin America you also hear <b>¿qué horas son?</b>, which is normal there but unusual in Spain.
Check yourself
How do you say “It’s one o’clock”?