Iam trying to convert date given in taiwan format(yyyMMdd) to dd/MM/yyyy. See the below code. If the given date is 0970229 in yyyMMdd format the output should be 29/02/2008 but it is printing 01/03/2008. It should print 29/02/2008 as 2008 is a leap year.
Is there any way to let the calendar know that the given year is a leap year?
I have read the documentation. There is only one method for replacing. i.e replace(char,char). How can i get the same result as this: String oldStr="2,756"; oldStr=oldStr.replaceAll(",","");
what is the character representation of a blank space? Iam trying to remove commas from a String for ex: String oldString="2,8764"; I can replace using String.replace(String,String) method. but our client uses jdk1.3. So i need to use String.replace(char,char) method.
The resulting string should be like this "28764" (note:there should not be any space between).
1) Use Date.parse() to parse this string . It will return a long value 2) Create a Date object with this long value 3) use java.text.SimpleDateFormat's format method to format it to the required date .