The current length of an enlistment is 8 years.
That can be 8 years of active duty, 8 years of ready reserve, selective reserve or a combination of active duty, ready reserve reserve, selected reserve, and the standby reserve.
If you did not retire after the minimum time required to get a retainer (currently 20 years of active duty service) then your oath of enlistment ends when your obligated service period ends (currently 8 years).
If you retired at the 20 year mark of an enlisted career then you still have 10 more years to serve in the retired reserve, or if you served longer on active duty then untill you reach the 30 year mark.
An officer does not take the oath of enlistment.
They are appointed / commissioned by the President.
It's called the officer appointment acceptance and oath of office.
An officer's oath of appointment ends when they request to be released from their appointment after they have served the minimum length of obligated service (currently 8 years).
Retired officers also follow the same guidelines as enlisted for retirement procedures.
So, to answer your question, as an enlisted person your oath expired when you were no longer legaly bound by it.
For those of you who continue to honor your oath of enlistment after you are no longer legaly bound to, I salute you!