Solved

convert month number to month name

Posted on 2006-11-03
1
2,362 Views
Last Modified: 2012-08-14
Hi:

How do I convert, say, 10 to OCT and 11 to NOV?

Thanks.
0
Comment
Question by:sdc248
1 Comment
 
LVL 86

Accepted Solution

by:
CEHJ earned 125 total points
ID: 17869696
DateFormat df = new SimpleDateFormat("MMM");
int month = 10;
System.out.println(df.format(month - 1)); // 0-indexed
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Running JavaFX on JDeveloper 12C 1 76
String array comparison 4 45
Java Restore security prompts not working 10 113
ejb entity bean example 2 31
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question