An opened bottle does not last for 3 years, it loses protection. Manufacturers advise to throw out after one year. Unopened bottles have a shelf life of 2-3 years and thats what the dates on the bottle refer to.
If in doubt, throw it out. Considering how cheaply you can get suncream now (if you go for non big brands) and how important it is to cover up, its not worth it.