public static void checkDatParam(SessionRequestContent request, Criteria criteria, String reqName, String critName){

        String param = (String) request.getParameter(reqName);
        if (param != null && !param.isEmpty()) {
            SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
            try {
                Date currDate = formatter.parse(param);
                criteria.addParam(critName, currDate);
            } catch (ParseException ex) {}
        }
    }