Great raw milk is made on the farm, but it's preserved at the customer. To ensure the greatest longevity and best flavor, make sure you do the following:
1) Keep the milk as cold as possible during transport. Use high quality coolers and put ice packs on top of the milk (cold air falls). Go straight home after pick-up and refrigerate immediately.
2) Make sure your refrigerator keeps the milk at 35- 38° F. Do not keep the milk in the door, which tends to be the warmest place.
3) Do not shake your milk. Just gently tip it to mix in the cream. Shaking can break up the fat globules, allowing enzymes to react with the fat and form free fatty acids. This will cause rancidity and a "cheesey" flavor. Incorporating oxygen into the milk will also cause the pH to drop, souring the milk. The significant contact with oxygen is why partial jugs of milk do not last nearly as long as full ones.
If the milk was high quality to begin with, these three things can help it to keep 2 weeks or even longer.