While conscripting Laertes to murder Hamlet, Claudius reveals this: (4.7.78-80, 89)
"You have been talked of since your travel much,/And that in Hamlets hearing,
/
not two months since,
"
So Hamlet can not have been gone on his sea voyage more than two months.