How can I get current date in Android?

前端 未结 26 2087
[愿得一人]
[愿得一人] 2020-11-27 10:24

I wrote the following code

Date d = new Date();
CharSequence s  = DateFormat.format(\"MMMM d, yyyy \", d.getTime());

But is asking me para

26条回答
  •  一向
    一向 (楼主)
    2020-11-27 11:08

    try with this link of code this is absolute correct answer for all cases all over date and time. or customize date and time as per need and requirement of app.

    try with this link .try with this link

提交回复
热议问题