The time when an event occurs can become part of autobiographical memories. In brain structures that support such memories, a neural code should exist that represents when or how long ago events occurred. Here we describe a neuronal coding mechanism in hippocampus that can be used to represent the recency of an experience over intervals of hours to days. When the same event is repeated after such time periods, the activity patterns of hippocampal CA1 cell populations progressively differ with increasing temporal distances. Coding for space and context is nonetheless preserved. Compared with CA1, the firing patterns of hippocampal CA3 cell populations are highly reproducible, irrespective of the time interval, and thus provide a stable memory code over time. Therefore, the neuronal activity patterns in CA1 but not CA3 include a code that can be used to distinguish between time intervals on an extended scale, consistent with behavioral studies showing that the CA1 area is selectively required for temporal coding over such periods.