系统时间显示方式

来源:互联网 发布:淘宝的账号怎么人肉 编辑:程序博客网 时间:2024/05/14 21:12

import java.text.SimpleDateFormat;import java.util.Date;

SimpleDateFormat    formatter    =   new    SimpleDateFormat    ("MM月dd日yyyy年");//("yyyy年MM月dd日    HH:mm:ss     ") Date curDate    =   new    Date(System.currentTimeMillis());//获取当前时间 String    str    =    formatter.format(curDate);
Toast.makeText(context,"data="+str,Toast.LENGTH_LONG).show();

原创粉丝点击