How to get the given date string format(pattern) in java?

后端 未结 10 1667
抹茶落季
抹茶落季 2020-11-30 04:41

I want to get the format of a given date string.

Example: I have a string like 2011-09-27T07:04:21.97-05:00 and the date format of this string is

10条回答
  •  温柔的废话
    2020-11-30 05:08

    You will need to take the inital date string and covert it to a date object and pass that converted date object and format it to your required string.

提交回复
热议问题