Want to get time in milliseconds in android Ex 19:57:21:522.How do i do this?Could not find any straight forward API's to do so.
Sca*_*bat 12
试试SimpleDateFormat
http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html
使用大写字母S的模式
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
String currentDateandTime = sdf.format(new Date());
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
14074 次 |
| 最近记录: |