How get month number from month name using Java code? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How get month number from month name using Java code?

3rd Mar 2020, 11:27 AM
Vignesh KR
Vignesh KR - avatar
2 Answers
+ 6
For current month you can use: LocalDate today = LocalDate.now(); int month = today.getMonthValue();
3rd Mar 2020, 12:30 PM
0_O-[Mägár_Sám_Äkà_Nüllpøïntêr_Èxëcéptïön]~~
0_O-[Mägár_Sám_Äkà_Nüllpøïntêr_Èxëcéptïön]~~ - avatar
+ 2
Thanks guys 🙏🙏🙏
3rd Mar 2020, 12:50 PM
Vignesh KR
Vignesh KR - avatar