code: public void setNextDate(final Date pValue, final String pPattern, final boolean pUseBcd) {
  		// create date formatter
  		SimpleDateFormat sdf = new SimpleDateFormat(pPattern);
  		String value = sdf.format(pValue);
  
  		if (pUseBcd) {
  			setNextHexaString(value, value.length() * 4);
  		} else {
  			setNextString(value, value.length() * 8);
  		}
  	}
docs: Method to write a date
  
  @param pValue
  the value to write
  @param pPattern
  the Date pattern
  @param pUseBcd
  write date as BCD (binary coded decimal)