I want to convert:
2010-03-15T16:34:46Z
into something like "5 hours ago"
How can I do this in Java?
See Question&Answers more detail:osI want to convert:
2010-03-15T16:34:46Z
into something like "5 hours ago"
How can I do this in Java?
See Question&Answers more detail:osJodaTime supports parsing from a user-defined format. See DateTimeFormatterBuilder and DateTimeBuilder.parseDateTime().
Once you have a DateTime, you can create a Duration or Period from that and the current time, and use another formatter to pretty-print. [See the PeriodFormatter example referenced by BalusC in comments above.]