/** * Convert this string to this field's binary data format. * Calls the DateConverter method. * @param tempString A string to be converted to this field's binary data. * @return The physical data converted from this string (must be the raw data class). */ public Object stringToBinary(String tempString) throws Exception { java.util.Date dateOld = new java.util.Date((long)this.getValue()); // Save current time return DateConverter.stringToBinary(tempString, dateOld, DBConstants.HYBRID_DATE_TIME_FORMAT); } /**
/** * Convert this string to this field's binary data format. * Calls the DateConverter method. * @param tempString A string to be converted to this field's binary data. * @return The physical data converted from this string (must be the raw data class). */ public Object stringToBinary(String tempString) throws Exception { java.util.Date dateOld = new java.util.Date((long)this.getValue()); // Save current time return DateConverter.stringToBinary(tempString, dateOld, DBConstants.HYBRID_DATE_TIME_FORMAT); } /**
/** * Convert this string to this field's binary data format. * Calls the DateConverter method. * @param tempString A string to be converted to this field's binary data. * @return The physical data converted from this string (must be the raw data class). */ public Object stringToBinary(String tempString) throws Exception { java.util.Date dateOld = new java.util.Date((long)this.getValue()); // Save current time return DateConverter.stringToBinary(tempString, dateOld, DBConstants.HYBRID_DATE_TIME_FORMAT); } /**
/** * Compute the target value. * @param srcValue The value of this listener's owner. * @return The value to set the target field to. */ public double computeValue(double srcValue) { double dateOtherDate = 0; double dateThisDate = 0; if (m_fldOtherDate != null) dateOtherDate = m_fldOtherDate.getValue(); else dateOtherDate = DateField.todaysDate(); dateThisDate = ((DateTimeField)this.getOwner()).getValue(); double tsDifference = (Math.floor((dateThisDate - dateOtherDate + 0.5)) / DBConstants.KMS_IN_A_DAY); // Rounded number of days return tsDifference; // Difference between this date and target } }
/** * Compute the target value. * @param srcValue The value of this listener's owner. * @return The value to set the target field to. */ public double computeValue(double srcValue) { double dateOtherDate = 0; double dateThisDate = 0; if (m_fldOtherDate != null) dateOtherDate = m_fldOtherDate.getValue(); else dateOtherDate = DateField.todaysDate(); dateThisDate = ((DateTimeField)this.getOwner()).getValue(); double tsDifference = (Math.floor((dateThisDate - dateOtherDate + 0.5)) / DBConstants.KMS_IN_A_DAY); // Rounded number of days return tsDifference; // Difference between this date and target } }
/** * Compute the target value. * @param srcValue The value of this listener's owner. * @return The value to set the target field to. */ public double computeValue(double srcValue) { double dateOtherDate = 0; double dateThisDate = 0; if (m_fldOtherDate != null) dateOtherDate = m_fldOtherDate.getValue(); else dateOtherDate = DateField.todaysDate(); dateThisDate = ((DateTimeField)this.getOwner()).getValue(); double tsDifference = (Math.floor((dateThisDate - dateOtherDate + 0.5)) / DBConstants.KMS_IN_A_DAY); // Rounded number of days return tsDifference; // Difference between this date and target } }
/** * Compute the target value. * @param srcValue The value of this listener's owner. * @return The value to set the target field to. */ public double computeValue(double srcValue) { double fldTimeField = 0; if (m_fldTimeField != null) fldTimeField = m_fldTimeField.getValue(); else fldTimeField = 0; double dateThisDate = ((DateTimeField)this.getOwner()).getValue(); double newDateTime = dateThisDate + fldTimeField * DBConstants.KMS_IN_A_DAY; // Rounded number of days return newDateTime; // Difference between this date and target } }
/** * Compute the target value. * @param srcValue The value of this listener's owner. * @return The value to set the target field to. */ public double computeValue(double srcValue) { double fldTimeField = 0; if (m_fldTimeField != null) fldTimeField = m_fldTimeField.getValue(); else fldTimeField = 0; double dateThisDate = ((DateTimeField)this.getOwner()).getValue(); double newDateTime = dateThisDate + fldTimeField * DBConstants.KMS_IN_A_DAY; // Rounded number of days return newDateTime; // Difference between this date and target } }
/** * Compute the target value. * @param srcValue The value of this listener's owner. * @return The value to set the target field to. */ public double computeValue(double srcValue) { double fldTimeField = 0; if (m_fldTimeField != null) fldTimeField = m_fldTimeField.getValue(); else fldTimeField = 0; double dateThisDate = ((DateTimeField)this.getOwner()).getValue(); double newDateTime = dateThisDate + fldTimeField * DBConstants.KMS_IN_A_DAY; // Rounded number of days return newDateTime; // Difference between this date and target } }