i have a jlabel which shows 01/12/1999 (date). i want to put this in a string that stores the value 01121999. how do i strip off the / from the jlabel.getText() ? Thanks
The first thing to look into is the java.text.DateFormat class. That may be all you need. You can also use a GregorianCalendar instance (from java.util package I believe) with a specific date in time (e.g. new Date()) and then work with the atomic pieces of information such as day of month, month, year, hour of day, etc.
Oops! I was answering a different question. You can use the indexOf() operation on String to find the location of a given '/' character, then just concatenate substrings of the original string that leave the '/' characters behind.