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 |
Is an object null?
can we write a program with out a class in core java?
what is ennumaration?
Is JRE required to compile Java files ?
What is the concept of multithreading?
Tell me the difference between an applet and a Japplet?
What are 3 boolean operators?
What is purpose of applet programming?
What are jee technologies?
Write a java program to count the number of words present in a string?
why use interface? if interface declear a method implement in class. why direct implement method in class
Java does not support multiple inheritance. how interface helps in the same?