Nik*_*hil 10
请试试这个..
SimpleDateFormat timeFormat = new SimpleDateFormat("hh:mm aa");
Date dt = new Date();
String strValue = timeFormat.format(dt);
Run Code Online (Sandbox Code Playgroud)
小智 7
Time time = new Time();
time.set(0, 0, 17, 4, 5, 1999);
Log.i("Time", time.format("%d.%m.%Y %H:%M:%S"));
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6463 次 |
| 最近记录: |