Solved

convert month number to month name

Posted on 2006-11-03
1
2,344 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
eclipse formatting 6 73
JList custom Cell Renderer refresh 15 53
Java - Why doesn't this JFrame work 3 44
Java DateChooser? 3 29
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

867 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now