Convert dates to integers