I am working on a callflow just now. Client needs to Date of Birth to be entered by their customers, the format they request it is entered is DDMMYYYY
(8 Digits). This is simple to do within the GUI we use to develop callflows without any sort of scripting, other than a substring to match this entered DOB to the format they actually have stored in their DB.
However now the client wants us to account for potential errors in input from their customers.
So they want to account for DMMYY
, DDMYY
, DDMMYY
AND DMMYYYY
. Again the majority of this can be handled by the Editor and working on varDOBInput.toString().length==5, 6
whatever.
The problem is the first 2 DMMYY
, DDMYY
, both ==5. That is when I can't use the editor and I can only script this. When thinking about the script I am not even sure how I can do this using an if statement.
if(varDOBInput.toString().length==5) {}
Both inputs are going to be equal to 5, how can I get Java to differentiate from the two? Is it even possible, because the if statement is just going to follow until a result is matched and it will be with .length==5
I am very much a beginner at Java, I am probably being a bit optimistic by saying beginner.