Serialize dates as integers