extract dates and header