It is advisable to wait about a week. Remember for the first 15-20 ejaculations sperm will still be present in your system, so use another form of contraception until semen analysis shows that sperm are no longer present in your seminal fluid.
How and when is the semen analysis done following my vasectomy?
You will have to provide a specimen of your semen by masturbating into a container provided by the doctors office. This fluid is then examined under a microscope to see if there are any sperm.