You can write a Date object by using the SimpleDateFormat class with a format specification that describes exactly how you want it formatted. See the Java API documentation for details.
Inputting "any date format" is a much bigger problem - is there any limit or system to the range of input formats there could be?
JamesCherrill
Posting Genius
6,373 posts since Apr 2008
Reputation Points: 2,130
Solved Threads: 1,073
Are you saying its dd?mm?yyyy ie 3 numbers separated by an arbitrary delimiter?
If so you can use the String split(aRegex) method to break a string into pieces, using a given regular expression to determine where to split - eg ifyou use the regex fpr "anything that's not 0-9" (ask a Regex expert) those strings will split into a 3 element array containing dd, mm and yyyy respectively.
JamesCherrill
Posting Genius
6,373 posts since Apr 2008
Reputation Points: 2,130
Solved Threads: 1,073