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 do you understand by Header linked List?
When try and catch block is used ?
What primitive Java types? Howmany are they and what are their names?
What are the differences between Java 1.0 and Java 2.0?
Can list be final in java?
can we create object for static class in java
14 Answers IAP Company, IBM, Marlabs, mPortal, TCS,
Explain java coding standards for classes or java coding conventions for classes?
What do you understand by a Static Variable?
How many bits are used to represent unicode, ascii, utf-16, and utf-8 characters in java programming?
What means public static?
Is jdk required on each machine to run a java program?
What is a website container?