Modified code to handle new fieldnames and date formats.