The prepositions ‘vor’, ‘nach’, ‘bei’, and ‘in’ provide a general sense of time related to an event or activity and are in the dative case (see below). ‘Vor’ generally means “before,” but can also be used as the equivalent of the English “ago” (e.g. Er ist vor zwei Wochen angekommen.). ‘Nach’ refers to “after,” and ‘bei’ is used for discussing doing something during an activity. ‘In’ is used much the same as in English — it denotes a future time when something will be completed or done (e.g. Ich fahre in zwei Tagen nach Zürich.).
Two other temporal prepositions are used with specific times (clock time, day, etc.) instead of activities, events, and similar as depicted above. ‘Bis’ essentially means ‘until’, but can be used in a phrase (‘von…bis’) to refer to a duration (‘from…to’). ‘Ab’ indicates a starting point in time (e.g. ‘from’ or ‘starting’) and moving forward.