The Egyptians constructed pyramids over a very long period of time. It is thought that Imhotep designed the earliest pyramid around 2630 BCE under the reign of Djoser in the Third Dynasty. This was a stepped-pyramid that resembled earlier flat-roofed tombs stacked on top of each other.
The Ancient Egyptians continued to construct pyramids over the next thousand years. Over this time, styles changed and were adapted by many builders, architects, and pharaohs. Each dynasty built off the style of the previous one.
It is commonly thought that the last ancient Egyptian pyramid to be built was that of Ahmose I during the Eighteenth Dynasty in the mid- to early-1500s BCE. However, it is possible that construction continued on and off until sometime in the 1300s. Unlike many earlier pyramids, this was not a tomb. Rather, it was a cenotaph, or a memorial, to important people buried elsewhere. Cenotaph pyramids of this period are actually in poorer condition than earlier pyramids, such as those at Giza, as they were constructed of cheaper materials and exhibited poorer craftsmanship. However, they can still be considered pyramids.
In short, the time era of Ancient Egyptian pyramids is roughly from 2600 BCE to 1500 (or possibly 1300 depending on some estimates) BCE. However, keep in mind that the styles and purposes of these structures varied over this time period.