How to convert Date.toString back to Date?

后端 未结 5 1473
礼貌的吻别
礼貌的吻别 2020-11-27 07:24

I have a string obtained by calling the toString method of instance of the class Date.
How can I get a Date object from this string?

Date d          


        
5条回答
  •  借酒劲吻你
    2020-11-27 07:35

    Take a look at SimpleDateFormat#parse(). It should provide the functionality you're looking for.

提交回复
热议问题