I know this is very HN, but I thought it was about 6AD - there is some evidence of Herod running a census around then IIRR. (And no Joseph and Mary would not have had to travel for the census - that woukd defeat the point of a census ... It seems that is just a way to get Jesus born in Bethlehem as opposed to out of the way nowhere Nazareth).