Convert dates and times to timestamps