How long a wait before being tested for STD's?

I just received a call from my niece’s husband. He is generally a nice guy but has done things in the past that would not be considered very smart. Yesterday he sold an old car for money due to recently becoming unemployed. Instead of using the all the money for necessities, he decided a night out with a couple of buddies would be a good use for some of the cash. He somehow ended up with a $20 hooker who told him after the fact he might want to consider being tested for HIV, things hadn’t been going well for her and she hadn’t been tested in a couple months. He went to a hospital ER and was tested, he said it came back negative. To me that seemed a bit soon to be tested. Many years ago when I was in the Navy, I had an encounter with a gal. A few days later she called and told me to be tested for an STD, her soon to be ex just told her he was positive and there was the possibility that her and any partners could have been infected. I was told by the Navy doc that I would have to wait a few weeks before a test could be done. Navy policy at the time was to treat, not test and I went through a series of penicillin shots. When tested a month later, I was clean.

My question is, how long after sexual contact does someone have to wait before being tested for HIV or other STD’s? Is it possible to tell just a few hours after contact?

IIRC, it takes the body roughly 6 months to form the antibodies that fight HIV, and that the standard test looks for these antibodies, not the actual virus. So your neice’s husband should look into another test in 6 months, and avoid sexual contact during that time period.