I'm not sure what you mean but you might mean this:
Stunde (plural: Stunden) vs. Uhr
8 Stunden = duration of 8 hours
8 Uhr = 8:00 (time)
So if you want to say that you've learned for 2 hours, you have to say that you've learned for 2 Stunden. But if you want to say that you've learned from 2:00 till 4:00 you have to say '2 Uhr bis 4 Uhr'.