title: How to Format this Date "2018-08-02T00:00:00+05:30" String to this "2018-18-02"
body: <pre><code>public class Kf_Date {
  
      public static String getDateUsingOracleFormat(String date) {
          try {
              DateFormat inputFormat = new SimpleDateFormat("yyy-MM-dd'T'HH:mm:ss.S");
              Date date2 = inputFormat.parse(date);
              SimpleDateFormat sdf = new SimpleDateFormat("YYY-MM-dd");
              String outputText = sdf.format(date2);
              return outputText;
          } catch(Exception e) {
              e.printStackTrace();
              return e.toString();
          }
      }
  
      public static void main(String... args) {
          System.out.println(new Kf_Date().getDateUsingOracleFormat("2018-08-02T00:00:00+05:30"));
      }
  
  }
  </code></pre>