title: Android Unparsable Date : Jan 06, 2017
body: <p>The funciton I'm using is </p>
  
  <pre><code>public static String getFormatedDate(String dateVal) {
      String tempDate = null;
      Locale systemLocale = Locale.getDefault();
  
      try {
          SimpleDateFormat formatter = new SimpleDateFormat("MMM dd, yyyy",
                  systemLocale);
          Date date = (Date) formatter.parse(dateVal);
          SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy");
          tempDate = sdf.format(date);
  
      } catch (Exception e) {
          ApplicationLog.log(TAG, e);
      }
  
      return tempDate;
  }
  </code></pre>
  
  <p>In many devices this function is working properly, but in one of the devices the exception is being raised while parsing the date. Does this exception is something to do with the <code>Locale.getDefault()</code>?. If yes what changes should I do? Thanks.  </p>
  
  <p>Calling the Function </p>
  
  <pre><code>Utilities.getFormatedDate(date);
  </code></pre>
  
  <p>And the exception is...</p>
  
  <pre><code>Utilities:java.text.ParseException: Unparseable date: "Jan 06, 2017" (at offset 0)
  at java.text.DateFormat.parse(DateFormat.java:579) 
  </code></pre>