Formatting a calendar date

前端 未结 5 503
不思量自难忘°
不思量自难忘° 2021-02-02 07:06

I just want the date to show up like so:

Saturday, May 26, 2012 at 10:42 PM

Here\'s my code so far:

Calendar calendar = Calendar.get         


        
5条回答
  •  清歌不尽
    2021-02-02 07:13

    Even simpler answer:

    SimpleDateFormat.getDateTimeInstance().format(cal.getTime())
    

提交回复
热议问题