converted all dates to Date type and updated API to handle them