-6

I have date in this format 2015-06-23T00:05:00+00:00 in string and Now I want to convert it in 2015-06-23 format and save that format in string.

Deepshikha Puri
  • 2,104
  • 22
  • 23

1 Answers1

1

Very common question- Please see this,

        Calendar c5 = Calendar.getInstance();
        SimpleDateFormat sdf5 = new SimpleDateFormat("yyyy-MM-dd");
        String strdate5 = sdf5.format(c5.getTime());
Shoeb Siddique
  • 2,805
  • 1
  • 22
  • 42