title: String Joiner help needed in Java
body: <p>I need a help in String Joiners and i want to append To_date to before string and the format after string..</p>
  
  <pre><code>public static StringJoiner inputDatesToQuery(
          List&lt;FileSubmtRetrlStatus&gt; fileSubmtRetrlStatus) {
      StringJoiner joinNames = new StringJoiner(",", "TO_DATE('", "','YYYY-MM-DD HH24:MI:SS')");   // passing comma(,) and square-brackets as delimiter   
      for (FileSubmtRetrlStatus status : fileSubmtRetrlStatus) {
          joinNames.add(status.getFileSubRetDateTime());
          }
      return joinNames;
  </code></pre>
  
  <p>But the out put is coming like as below..</p>
  
  <pre><code>TO_DATE('2017-04-13 11:18:16,2017-04-13 11:17:44,2017-04-13 10:16:07',
  'YYYY-MM-DD HH24:MI:SS')
  </code></pre>
  
  <p>But it should be like below...</p>
  
  <pre><code>TO_DATE('2017-04-13 11:18:16,'YYYY-MM-DD HH24:MI:SS'),
  TO_DATE('2017-04-13 11:17:44,'YYYY-MM-DD HH24:MI:SS'),
  TO_DATE('2017-04-13 10:16:07,'YYYY-MM-DD HH24:MI:SS')
  </code></pre>