title: How to split a date from String by using Selenium?
body: <p>In the string below I want to keep date in separate varible by separating from the total String. </p>
  
  <pre><code>    String text="The client start date is 13/10/2018";
      String[] effectiveDateText=text.split(" ");
  
      for(int i=0;i&lt;effectiveDateText.length;i++){
          String effectiveDate=effectiveDateText.length-1;
      }
  </code></pre>
  
  <p>I get a compiler error message saying</p>
  
  <blockquote>
    <p>Type mismatch: cannot convert from int to String</p>
  </blockquote>
  
  <p>What is the correct way to get date into a separate variable?</p>