Monday, August 20, 2018

How to format date string in java?





Hi i have the following string:2012-05-20T09:00:00.000Z
and i want to format it to be like 20/05/2012, 9am




How to do so in java?



Thanks


Answer



use SimpleDateFormat to first parse() String to Date and then format() Date to String


No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...