The year 2951 of the Third Age. The White Council had, however, known that the Necromancer was really Sauron since 2850, when Gandalf had entered Dol Guldur in secret to confirm just that.
He refers to this explicitly in
The Council of Elrond (
The Lord of the Rings, Book II, chapter II).
For discussions about the Necromancer, you could try looking at
this thread on page one of Novices and Newcomers, or in the more in-depth Books thread to which it links. There is also an excellent
search facility, which should be able to provide more answers to common questions such as this.