HI there.
I need to know if a date string (any date format) is part of a longer string. The problem is that the date string position can change its position in the longer one, so you can not use the left(), right() excel funtion to retrieve it. Moreover the date format separator can change too. For example "2021/08/26" or "2021-08-26".
For instance, I have the following string between " ":
"D.:Virtual^Code-GF_SSO^N.H.:16^F.I.:12/08/2021^F.T.:2021/06/12^N.A.:1^N.I.:0^V.C.:32000^T.D.:O/C 12118^ID:"
As you can see there is a Date String (dd/mm/yyyy) embedded in this string. In this case the Date String is 12/08/2021 as it is shown in red below:
"D.:Virtual^Code-GF_SSO^N.H.:16^F.I.:12/08/2021^F.T.:2021/06/12^N.A.:1^N.I.:0^V.C.:32000^T.D.:O/C 12118^ID:"
QUESTION 1: Is there any way to know if the Date String is embedded in the long string? With Excel functions or with a VBA code
QUESTION 2: Once identified if exist the Date String in the longer one, how can I read?
Any help is welcome.
Best regards
Hernán
I need to know if a date string (any date format) is part of a longer string. The problem is that the date string position can change its position in the longer one, so you can not use the left(), right() excel funtion to retrieve it. Moreover the date format separator can change too. For example "2021/08/26" or "2021-08-26".
For instance, I have the following string between " ":
"D.:Virtual^Code-GF_SSO^N.H.:16^F.I.:12/08/2021^F.T.:2021/06/12^N.A.:1^N.I.:0^V.C.:32000^T.D.:O/C 12118^ID:"
As you can see there is a Date String (dd/mm/yyyy) embedded in this string. In this case the Date String is 12/08/2021 as it is shown in red below:
"D.:Virtual^Code-GF_SSO^N.H.:16^F.I.:12/08/2021^F.T.:2021/06/12^N.A.:1^N.I.:0^V.C.:32000^T.D.:O/C 12118^ID:"
QUESTION 1: Is there any way to know if the Date String is embedded in the long string? With Excel functions or with a VBA code
QUESTION 2: Once identified if exist the Date String in the longer one, how can I read?
Any help is welcome.
Best regards
Hernán