I have read quite a few theories on this subject, and although Hamlet is most definitely set in Denmark, Shakespeare left the time aspect of setting purposely ambiguous. I have heard people say that the timing was the fourteenth century (mostly because of the medieval flavor of the play); however, I have also heard that it was most likely set in Shakespeare's time (mostly for lack of more information). The truth of the matter is that Shakespeare didn't really reveal the time in which Hamlet was set.
Still, one can gain a lot of information from the works from which Shakespeare "borrowed" in order to create the play. Ironically, 400 years before Shakespeare lived, (around the year 1200) there was a very similar story written called Historica Danica. In addition, the writer Thomas Kyd wrote both The Spanish Tragedy and something commonly called the Ur-Hamlet that was acted around 1594. Shakespeare borrowed from both of them to write his play. (Actually, I had a teacher in high school who swore that Thomas Kid WAS Shakespeare.) Then if you take into account that Hamlet was most likely written around the year 1600 (and you believe that it is not set in the future, that is), then it's a safe guess that Hamlet was set between the years of 1200 and 1600. Then again, a span of 400 years isn't really specific, is it?
One difference between both artists and audience of today and times before, say, the mid-17th century is that they did not have the same concept of time in art as we do. A painter in the 14th century rendering a scene in Roman times would portray the people dressed in 14th century fashions, and the architecture would be that existing in the artist's time, not the historic period.
It was the same in Shakespeare's day. Educated people might realize Hamlet was based on an historic event in Denmark's past, but they wouldn't expect to see the play look as if it were the past. Shakespeare wrote plays taken from British history set in pre-gunpowder times which included armies with cannon. This just wasn't an issue to the audience or the actors. So while Hamlet was about events from an earlier era, the setting in time simply was not relevant to the contemporary audience.