Is there a way to reformat a date using .replace
and a regex? or a series of them?
for example I would like to turn May 4, 1981
into 1981-May-04
... this would be good enough for my needs.
but even better would be to turn May 4, 1981
into 1981-05-04
.
please note that single digit months and dates need to be changed to double digit (i.e. prefix a 0). The source text May 4, 1981
would not contain a leading 0 for the day ever.
the end result YYYY-MM-DD being sortable, which is why the leading 0 is important.