Write a java program to display a date input by user in three different formats. 1. DD/MM/YYYY 2. MM/DD/YYYY 3. DD MM,YYYY | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

Write a java program to display a date input by user in three different formats. 1. DD/MM/YYYY 2. MM/DD/YYYY 3. DD MM,YYYY

I have written this code. Please help me to find the error and run this program. https://code.sololearn.com/c4XgmUtLhv8C/?ref=app

23rd Sep 2020, 1:51 PM
Atul Gautam
Atul Gautam - avatar
4 Respostas
+ 5
Atul Gautam Please check this again. Does it satisfy your needs now? https://code.sololearn.com/cv9ftfTL8vst/?ref=app
23rd Sep 2020, 2:54 PM
Minho
Minho - avatar
+ 4
Atul Gautam You're welcome. Yeah! There are many ways to do that. You can refer this for more infošŸ‘‡ https://stackoverflow.com/questions/4011075/how-do-you-format-the-day-of-the-month-to-say-11th-21st-or-23rd-ordinal
23rd Sep 2020, 3:39 PM
Minho
Minho - avatar
0
Minho thanks for the help. But it is giving today's date not the date entered by user. It is giving problem.
23rd Sep 2020, 2:09 PM
Atul Gautam
Atul Gautam - avatar
0
Minho Thankyou so much for your help. I got it. Just one question I have that Is there any way to display 'th' for like 11, 12, 13 etc or 'nd' for 2, 22 etc or 'st' for 1, 31 etc along with date in case of last date format ??
23rd Sep 2020, 3:34 PM
Atul Gautam
Atul Gautam - avatar