datepicker selected day of the week android

后端 未结 3 1626
太阳男子
太阳男子 2021-01-13 04:20

I have date picker in my application and its works well .But I need selected day of week instead of date (i.e., if I select the date 23 I need to get day like \"friday\" ins

3条回答
  •  一生所求
    2021-01-13 05:08

    This will give u the day names::

    SimpleDateFormat sdf = new SimpleDateFormat("EEEE");
                Date d_name = new Date();
                String dayOfTheWeek = sdf.format(d_name);
    

提交回复
热议问题