阅读背景:

【tmos】使用joda-time来个格式化时间

来源:互联网 

代码

@Test
public void test(){
    DateTime dateTime = new DateTime();
    String str = dateTime.toString("yyyy-MM-dd HH:mm:ss");
    System.out.println(str);

    Date date = new Date();
    dateTime = new DateTime(date);
    str = dateTime.toString("yyyy-MM-dd HH:mm:ss");
    System.out.println(str);
}@Test
public void test(){
    DateT



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: