Task I have incoming data in the below Input Format. This encodes a date range using a specific format. I now want to extract from this string two strings, in a new date format.
Input Format: The input format is as follows: Format: [Start Day in 2 digits including leading 0] [Start Month encoded as 3 first 3 letters of the month] - [Month in full], [Year in 4 digit format]
Examples are:
inputDate="16 Aug - 30 Sep 2022"
inputDate="04 Dec - 14 Jan 2022"
- Desired Output Format: I want to split the string and use standard ISO date format of DD-MM-YYY
Examples:
outputStartDate="16-08-2022"
outputEndDate="30-09-2022"
- Limitations: At the input/ extract stage I can manipulate the data with Regex. At the output stage, the data is received in a MySQL database (AWS RDS).
I hope there are some Regex superstars who love a challenge and can help, or point me to where I can solve this problem.
Thanks everyone.