Hi, I am receiving multiple date formats from the document like either a single date or a date range… I would like to get the from date and to date from a string. Challenge is, i may get the string in different date formats and also sometimes TO date might not come in the string as well. how to get this. below are some possible scenarios
- 05/05/2020 - 05/05/2021
- 05-05-2020 - 05-05-2021
- 05-05-2020 to 05-05-2021
- 05/05/2020 through 05/05/2021.
From the above example, my output would be just 2 values (if its date range), same code should work to get the single values also (like example 1). For example 1 - it should retrieve only FromDt : 05/05/2020
- FromDt : 05/05/2020
- ToDt : 05/05/2021