How to get Date format like this in android?

前端 未结 2 1404
情深已故
情深已故 2021-01-29 00:22

How to get Date format like this?

Saturday,Dec 11,2011

Edited:

My code portion is like the following:

   String outDate         


        
2条回答
  •  攒了一身酷
    2021-01-29 00:32

    You can use SimpleDateFormat.

    Try:

    SimpleDateFormat formatter = new SimpleDateFormat("EEEE,MMM dd,yyyy");
    String text = formatter.format(...);
    

    That will use the default locale - adjust accordingly for a different one.

提交回复
热议问题