public static Date getDateParam(SessionRequestContent request, String name){
        String param = (String) request.getParameter(name);
        if (param != null && !param.isEmpty()) {
           SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
            try {
                Date currDate = formatter.parse(param);
                return currDate;
            } catch (ParseException ex) {
                return null;
            }
        }
        return null;
    }