how to convert mm/dd/yy to dd/mm/yy using collections in
java.
Answer Posted / 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 |
Post New Answer View All Answers
What are the special characters?
What is null mean in java?
What is the use of default method in interface in java? Explain
What does mean in regex?
Why string is immutable or final in java
What is return in java?
Why string is a class?
How can you share data between two thread in Java?
Explain the concept of hashtables?
Can a class be final?
What is java ceil?
What does java final mean?
What is vector capacity in java?
What is a numeric format?
What is structure of java heap? What is perm gen space in heap?