For specific dates you have to rely on historical accounts.
Obviously people can lie or just be wrong, so all historical accounts have to be taken with a grain of salt.
BUT, if you were to find say 2-3 different, unrelated historical accounts that have the SAME facts, for example in Ancient Rome if one account was written in Rome, and the other written in Greece hundred of miles away by two different people who didn’t speak, you can be a bit more reliant on that info because it is unlikely that the same misinformation would show up in two different sources. And the more agreeing sources you have, the better. And that’s for trying to know when a specific day/week event happened.
Long term things are even easier, because rulers often kept near track of things going on during their rule. Or if they didn’t, it was not uncommon for years to be measured by how long that ruler had been ruling, for example “in the 5th year of the reign of XYZ” before calendars were widespread and standardized.
So then you can just line up all these records with a day you know/can verify, and work your way backwards.
Archeological evidence also helps, archeological discoveries can be dated to different eras just by the artifacts present, as well as chemically testing those artifacts to find their age. Usually with Radioisotope dating.
Historians also can now turn to astronomers in some cases. Say a historical text mentions an eclipse or a comet. Well eclipses and comets are things that happen on a pretty standard path, the moon is always going around the earth at the same speed and angle, and some comets steadily move through the solar system in a similar fashion. So astronomers can actually rewind the clock and figure say, how many years ago an eclipse would have been visible in Egypt, and then match those dates up to your ancient Egyptian text.
Latest Answers