@Override
  public Object evaluate(DeferredObject[] arguments) throws HiveException {
    if (arguments[0].get() == null) {
      return null;
    }

    Object daysWritableObject = daysConverter.convert(arguments[1].get());
    if (daysWritableObject == null) {
      return null;
    }

    int toBeAdded;
    if (daysWritableObject instanceof ByteWritable) {
      toBeAdded = ((ByteWritable) daysWritableObject).get();
    } else if (daysWritableObject instanceof ShortWritable) {
      toBeAdded = ((ShortWritable) daysWritableObject).get();
    } else if (daysWritableObject instanceof IntWritable) {
      toBeAdded = ((IntWritable) daysWritableObject).get();
    } else {
      return null;
    }

    // Convert the first param into a DateWritableV2 value
    switch (inputType1) {
    case STRING:
      String dateString = dateConverter.convert(arguments[0].get()).toString();
      if (DateParser.parseDate(dateString, dateVal)) {
        output.set(dateVal);
      } else {
        return null;
      }
      break;
    case TIMESTAMP:
      Timestamp ts = ((TimestampWritableV2) dateConverter.convert(arguments[0].get()))
        .getTimestamp();
      output.set(DateWritableV2.millisToDays(ts.toEpochMilli()));
      break;
    case DATE:
      DateWritableV2 dw = (DateWritableV2) dateConverter.convert(arguments[0].get());
      output.set(dw.getDays());
      break;
    default:
      throw new UDFArgumentException(
        "DATE_ADD() only takes STRING/TIMESTAMP/DATEWRITABLE types, got " + inputType1);
    }

    int newDays = output.getDays() + (signModifier * toBeAdded);
    output.set(newDays);
    return output;
  }
UDFDateAdd.

Add a number of days to the date. The time part of the string will be
ignored.

NOTE: This is a subset of what MySQL offers as:
http://dev.mysql.com/doc/refman
/5.1/en/date-and-time-functions.html#function_date-add
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFDateAdd.java