Joda-Time Formatter with a dateStyle and a timeStyle

后端 未结 2 706
被撕碎了的回忆
被撕碎了的回忆 2021-01-21 03:49

With java.text.DateFormat, it\'s possible to build a date formatter with a date and a time style :

DateFormat df = getDateTimeInstance(DateFormat.SHORT, DateForm         


        
2条回答
  •  时光说笑
    2021-01-21 04:05

    Use DateTimeFormat.forPattern() with a pattern that does what you want. For instance, DateTimeFormat.forPattern("YYYY-MM-dd HH:mm:ss");

提交回复
热议问题