title: how to filter object by localDateTime in java spring boot?
body: <p>I have object, this is describe of it?</p>
  
  <pre><code>public MemberSkills(User user, BasicSkills skills, Short level, Short status, LocalDateTime confirmDate, String comment) {
      this.user = user;
      this.skills = skills;
      this.level = level;
      this.status = status;
      this.confirmDate = confirmDate;
      this.comment = comment;
  }
  </code></pre>
  
  <p>I want to filter MemberSkill by from "confirmDate" to "confirmDate".
  I am using Java-8 &amp; Java-springboot.
  I tried, but it did not work.</p>
  
  <pre><code>LocalDateTime fromdate = LocalDateTime.parse(memberSkillRequest.getFromDate(), formatter);
  LocalDateTime toDate = LocalDateTime.parse(memberSkillRequest.getToDate(), formatter);
  
  List&lt;MemberSkills&gt; filterMemberSkill = memberSkills.stream().filter(memberSkill -&gt; memberSkill.getConfirmDate().isBefore(fromdate)).collect(Collectors.toList());
  List&lt;MemberSkills&gt; listMemberSkill = filterMemberSkill.stream().filter(memberSkill -&gt; memberSkill.getConfirmDate().isAfter(toDate)).collect(Collectors.toList());
  </code></pre>
  
  <p>fromdate and todate get from client send up.</p>