I'm new to Java and am trying to extract values from a date-related user input string and split it into a DD-MM-YYYY format.
I tried to use the code below:
String inputString = "s.param1";
String[] arraySplit_3 = inputString.split("-");
for (int i=0; i < arraySplit_3.length; i++){
System.out.println(arraySplit_3[i]);
}
s.param1
gets the input of the user, I use a separate excel file for it.
if s.param1 = 15-05-2010
I wish to get this output:
DD: 15
MM: 05
YYYY: 2010
Is there a way to create a method like this?