Package com.alibaba.wasp.jdbc.value

Examples of com.alibaba.wasp.jdbc.value.ValueDate


   */
  public static Date convertDate(Value value, Calendar calendar) {
    if (value == ValueNull.INSTANCE) {
      return null;
    }
    ValueDate d = (ValueDate) value.convertTo(Value.DATE);
    Calendar cal = (Calendar) calendar.clone();
    cal.clear();
    cal.setLenient(true);
    long dateValue = d.getDateValue();
    setCalendarFields(cal, yearFromDateValue(dateValue),
        monthFromDateValue(dateValue), dayFromDateValue(dateValue), 0, 0, 0, 0);
    long ms = cal.getTimeInMillis();
    return new Date(ms);
  }
View Full Code Here

TOP

Related Classes of com.alibaba.wasp.jdbc.value.ValueDate

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.