String date array has dates where user enters it and I don't know the format but I want to covert that into dd MMM yyyy format. Is it possible help me with the code.
|  | 
String date array has dates where user enters it and I don't know the format but I want to covert that into dd MMM yyyy format. Is it possible help me with the code.
Without knowing the input format, it will be REALLY hard unless you have rules. For example if your rules are:
1) Year is ALWAYS 4 numbers
2) Month is ALWAYS 3 letter abbrevation.
3). Day is ALWAYS 2 letters
Then yes, you just need to tokenize the input and use a switch or if tree based on the string length of each token.
If the input has NO rules... Good luck. What day is 2/10/2015 ? Feb or Oct?
| All times are GMT -7. The time now is 03:11 AM. |