The best two beaches near to Bangkok are at Koh Samet and Hua Hin both about 2.5-3 hours away by car. There are other beaches such as Bang Saen and Pattaya but the sand is not so fine, more like coarse sand and shells. Also being in the Gulf of Thailand the water is still affected by the sediments coming out of the Chaophrya River.
For three nights Koh Samet would be my choice, just enough to do and not to far.You can take the bus from Ekkamai bus station for less than 200 Baht.
when i went to bangok there was this really nice beach in a place called pattaya (jomtien beach i think it was called) it was amazing and had that white sand and an actual blue ocean. it was next to our hotel called white house resort. Anyway, that was a really good beach.