How to get Date format like this in android?

前端 未结 2 1406
情深已故
情深已故 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:42

    Try to use this function

     Date today=new Date();
            public String getCurrentTime()
            {
    
             SimpleDateFormat sdf = new SimpleDateFormat("EEEE,MM,dd,YYYY");
             String ClsCurrentDay = sdf.format(today);
             return ClsCurrentDay;
            }
    

提交回复
热议问题