Time displayed in Logcat

前端 未结 6 665
野趣味
野趣味 2021-02-01 13:45

I need to get the Android device timestamp in the format hh:mm:ss:SS. I am able to view the time displayed in the Logcat of Eclipse. Is it the computer\'s time or is it the Andr

6条回答
  •  死守一世寂寞
    2021-02-01 14:19

    If you need the device date programmatically:

     SimpleDateFormat s = new SimpleDateFormat("hh:mm:ss");
        String format = s.format(new Date());
    

提交回复
热议问题