Provided you don't leave it out, the date on the label will be very accurate. You might be able to drink it for a little while after, but it won't taste very good. As everyone said, smell is the best way. Bad milk smells like s**t. Unfortunately, it tastes even worse. If it fails the smell test, don't bother with the taste one.
On a side note, here's a good test for eggs. In case an egg looks like it is bad, fill up a tall glass of water. The egg should hit the bottom. If it floats, throw it out. Bacteria have caused gas inside the egg and are causing it to float.