Because Albert knows the month June but he is not sure it is June 17 or June 18 but Albert knows that Bernard also doesn’t know, because if the date would be June 18 Bernard could tell it by now. Albert knows for sure that ONLY Bernard will not be able to tell the month if it’s June 17 or August 17. So Albert says that he knows that Bernard doesn’t know.
And Bernard listens that and immediately realizes that only Albert will be able to say so confidently that Bernard doesn’t know is only when the date 17 is repeated twice as June 17 and August 17.
Knowing Albert’s confidence Bernard realizes the Month is obviously June NOT August and the date is June 17.
As Bernard confirms that he knows the date, Albert also realizes that it is June 17.
Hence the answer is June 17.