Depending on when you served and what branch you were in will determine how long you had to have been in service to be eligible for a VA loan.
Such examples are if you have been on active duty continuously for at least 90 days during wartime or 181 days during peacetime. Reservists or National Guard personnel would have to have completed 6 years of service, unless discharged for a service connected disability or had at least 90 days of deployment for combat also can obtain a VA loan. In all cases, you must have been discharged other than dishonorably. Please call or email us if unsure, and we can help determine if you are eligible.
The official guide to who is eligible can be found here at the VA benefits website