His total military service was 5 years and 4 months ?
That was his service as a regular officer of the Royal Air Force (six months training) and Royal Navy (five years, two months, including service as a helicopter pilot with 845 Squadron flying commando units, and command of a minehunter).
He has a great deal of 'ceremonial' service as well and some of that - although I couldn't say precisely how much - has crossed back over into regular service at times for logistical reasons (until recently he quite often flew Royal Air Force planes himself when using them for royal trips, and to do that, he had to temporarily return to RAF service).