converting dates and times into objects