code: public static long getDateParameter(final ServletRequest pReq, final String pName, final long pDefault) {
          String str = pReq.getParameter(pName);
          try {
              return str != null ? StringUtil.toDate(str).getTime() : pDefault;
          }
          catch (IllegalArgumentException iae) {
              return pDefault;
          }
      }
docs: Gets the value of the given parameter from the request converted to
  a {@code Date}.&nbsp;If the parameter is not set or not parseable, the
  default value is returned.
  
  @param pReq     the servlet request
  @param pName    the parameter name
  @param pDefault the default value
  @return the value of the parameter converted to a {@code Date}, or the
  default value, if the parameter is not set.
  @see com.twelvemonkeys.lang.StringUtil#toDate(String)