cast date format string into value

Is there any method to get value like (070215) from date fomat String(15/02/2007)
[88 byte] By [shiva_Ideaa] at [2007-11-26 19:32:29]
# 1

What you describe has nothing to do with dates. It's simply string manipulation.

This will do it for the case where it's always XX/YY/ZZZZ. You'll have to tweak the regex if there's flexibility in, say, the number of digits.

String out = in.replaceAll("(\\d{2})/(\\d{2})/\\d{2}(\\d{2})", "$3$2$1");

[url=http://java.sun.com/docs/books/tutorial/extra/regex/index.html]Sun's Regular Expression Tutorial for Java[/url]

[url=http://www.regular-expressions.info/]Regular-Expressions.info[/url]

jverda at 2007-7-9 22:03:45 > top of Java-index,Archived Forums,Java 2 Software Development Kit (J2SE SDK)...