[android-developers] H0w to convert monthname to month number
I have to convert month name in to month number (JAN=1,FEB=2,MARCH=3........
String month = getIntent().getStringExtra(
"MONTH"); int
x =Integer.parseInt(month);if (month.equals("JAN")) {
x = 1;
}
else if (month.equals("FEB")) {
x = 2;
}
else if (month.equals("MARCH")) {
x = 3;
} else if (month.equals("APRIL")) {
x = 4;
} else if (month.equals("MAY")) {
x = 5;.....
if i do like this am getting fata close exception...
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home