android:长数字转日期格式

函数如下:

    public String test(String beginDate) {
        SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        String sd = sdf.format(new Date(Long.parseLong(beginDate)));
        return sd;
    }

调用:

 update_at.setText(test(“20110219”));

end~

猜你喜欢

转载自blog.csdn.net/title71/article/details/113893310
今日推荐