how to convert mm/dd/yy to dd/mm/yy using collections in
java.
Answers were Sorted based on User's Feedback
Answer / sankar
Hi, Here is the Program
import java.util.Date;
import java.text.SimpleDateFormat;
class DateConversion{
public static void main(String ar[])throws Exception
{
String strDate = "06/12/2008";
SimpleDateFormat srcDate = new SimpleDateFormat
("mm/dd/yyyy");
SimpleDateFormat destDate = new SimpleDateFormat
("dd/mm/yyyy");
System.out.println(destDate.format
(srcDate.parse(strDate)));
}
}
Is This Answer Correct ? | 19 Yes | 6 No |
Answer / sandya
Thanks Shankar.
can u send more examples on Date.
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / zaini
SimpleDateFormat srcDate = new SimpleDateFormat
("MM/dd/yyyy");
SimpleDateFormat destDate = new SimpleDateFormat
("MM/mm/yyyy");
Is This Answer Correct ? | 1 Yes | 1 No |
what is j2se
Program to print 1 1 2 1 2 3 1 2 3 4 like that
What is module in project?
How big is a gigabyte?
What is a boolean used for?
Difference between prefix and postfix forms of the ++operator?
What super () does in java?
Does java initialize arrays to zero?
What should I import for arraylist in java?
How many bits are used to represent unicode, ascii, utf-16, and utf-8 characters in java programming?
What are types of Java applications?
Name the method that used to clear the buffer ?