How to format Joda-Time DateTime to only mm/dd/yyyy?

前端 未结 9 1201
挽巷
挽巷 2020-11-29 15:52

I have a string \"11/15/2013 08:00:00\", I want to format it to \"11/15/2013\", what is the correct DateTimeFormatter pattern?

9条回答
  •  有刺的猬
    2020-11-29 16:09

    DateTime date = DateTime.now().withTimeAtStartOfDay();
    date.toString("HH:mm:ss")
    

提交回复
热议问题