public static String getDateUsingOracleFormat(String date) {
try {
DateFormat inputFormat = new SimpleDateFormat("YYYY-MM-dd'T'HH:mm:ss");
Date date2 = inputFormat.parse(date);
SimpleDateFormat sdf = new SimpleDateFormat("YYYY-MM-dd");
String outputText = sdf.format(date2);
return outputText;
} catch (Exception e) {
e.printStackTrace();
return e.toString();
}
}
try {
DateFormat inputFormat = new SimpleDateFormat("YYYY-MM-dd'T'HH:mm:ss");
Date date2 = inputFormat.parse(date);
SimpleDateFormat sdf = new SimpleDateFormat("YYYY-MM-dd");
String outputText = sdf.format(date2);
return outputText;
} catch (Exception e) {
e.printStackTrace();
return e.toString();
}
}