1

Is it possible to convert "yyyy-MM-dd HH:mm:ss" format to Monday 25th March, 16:30 in Java. I didn't find anything which give me 25th.

Any ideas, please share. Thanks

Rajeev Sahu
  • 1,732
  • 6
  • 26
  • 39
  • Proposed answer is for different question. This one is around how to get '25th' as day. – talex Aug 27 '14 at 06:13
  • Are you asking how to get the `th` in `25th`? Or the `rd` in `3rd` or the `nd` in `2nd`? – Sotirios Delimanolis Aug 27 '14 at 06:14
  • @Sotirios Delimanolis, not duplicate one as SO requires to format day like `25th`. – Wundwin Born Aug 27 '14 at 06:14
  • 1
    See [here](http://stackoverflow.com/questions/4011075/how-do-you-format-the-day-of-the-month-to-say-11th-21st-or-23rd-in-java). – Sotirios Delimanolis Aug 27 '14 at 06:16
  • I want all things i.e. to get the th in 25th, the rd in 3rd and the nd in 2nd. If my String is "2014-08-01 14:40:30" then result should be like: Friday 1st August, 14:40. Similarly if my String is "2014-08-02 14:40:30" then result should be like: Saturday 2nd August, 14:40, for "2014-08-03 14:40:30" it should be Sunday 3rd August, 14:40 and for "2014-08-04 14:40:30" it should be Monday 4th August, 14:40. I hope it is clear to you now. – Rajeev Sahu Aug 27 '14 at 06:49
  • Is there any direct way to convert the format? – Rajeev Sahu Aug 27 '14 at 08:42

0 Answers0