Removing data with pattern matching

I have the following:

HH:MM:SS

I want to use either % or # sign to remove :SS can somebody please provide me an example. I know how to do this in awk, but awk is too much
overhead for something this simple since I will be doing this in a loop a lot of times.

Thanks in advance to all who answer

time=HH:MM:SS
echo ${time%???}
# time="HH:MM:SS"
# echo ${time%*:*}
HH:MM