private static Date toDate(Double date) {
   return date == null ? null : DateUtils.parseSecondsFromEpoch(date);
 }
 private static Date toDate(String date) {
   return date == null ? null : DateUtils.parseFromIso8601(date);
 }