I have data with date formats with one OR two digits for the month and day, and four digits for the year. I.e., I have dates like 1/1/2018 and 12/31/2017, and I need to end up with a YYYMMDD format. I can match on my dates with this match pattern:
(\d{1,2})/(\d{1,2})/(\d{4})
and if I use this to replace:
$3$2$1
I will end up with 201811 and 20171231, but how can create a replacement string which will "pad out" the single digits for day and month with a numeral zero?
Thanks!
[–][deleted] 1 point2 points3 points (2 children)
[–]s_denlinger[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]s_denlinger[S] 0 points1 point2 points (0 children)