Java date format real simple

后端 未结 4 2020
生来不讨喜
生来不讨喜 2021-01-24 17:09

how would you write te date if i have a date and all i want is the month and the day like this (mm/dd) and then turn the month like this July, 08

4条回答
  •  走了就别回头了
    2021-01-24 17:48

    Use:

    Format formatter = new SimpleDateFormat("MMMM, dd");
    String s = formatter.format(date);
    

    Formatting a Date Using a Custom Format

提交回复
热议问题