Package pt.opensoft.util

Examples of pt.opensoft.util.DateTime


        String date = readString(format.length());
        if (date == null || date.trim().equals("") ||
                date.equals(new String("0000000000000000").substring(0,format.length()))) {
            return null;
        } else {
        return new DateTime(date, format);
        }
  }
View Full Code Here


                break;

            case Types.DATE:
            case Types.TIME:
                if (value.length() == 10) value += " 00:00:00";
                _value = new DateTime(value, _field.getDateFormat(), true);
                break;

            case Types.TIMESTAMP:
                _value = new Timestamp(value, _field.getDateFormat(), true);
                break;
View Full Code Here

    public void setValue(java.sql.Timestamp value) {
        if (_field.getType() == Types.TIMESTAMP) {
            _value = new Timestamp(value, _field.getDateFormat(), false);
        } else { // � um DateTime
            _value = new DateTime(value, _field.getDateFormat(), false);
        }
        setModified(true);
    }
View Full Code Here

      if (str.equals(_nullDate)) {
        return EMPTY_STR;
      } else {
        Attribute dateFormatSpec = spec.getAttribute("dateFormat");
        String dateFormat = (dateFormatSpec == null) ? DEFAULT_DATE_FORMAT : dateFormatSpec.getValue();
        DateTime data = null;
        try {
          data = new DateTime(str, dateFormat);
        } catch (Exception e) {
          return EMPTY_STR;
        }
        return data.formatDate();
      }
    } else if (_type.equals(AMOUNT)) {
      Attribute nullValueAttr = spec.getAttribute("nullValue");
      if (nullValueAttr != null && nullValueAttr.getValue().equals(str)) return EMPTY_STR;
      int _length = Integer.parseInt(spec.getAttribute("length").getValue());
View Full Code Here

TOP

Related Classes of pt.opensoft.util.DateTime

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.