Reformating a Date within a String
Posted on 2016-09-09
I have a very unique request to reformat a date that is within a string.
Needs to read: <RequestedDate Type="DeliverOn">2016-09--12</RequestedDate>
It is a dynamic date.. My thought was something like grabbing the data between >< to work with it.
- data between > and first / = month and has to be in a "MM" fomat with leading 0 < 10
- data between first / and second / = day and needs to be "DD" format with leading 0 < 10
- data between second / and < = year in "YYYY" format
last concatenate year&"-"&month&"-"&day Resulting in a format of YYYY-MM-DD
Is this possible to grab the specific values from the string and name them so they can be used in a concatenation/reformat of the string?
It is not possible to reformat prior to string, because when the .xml is generated it chg's the format on me. Any idea's?