I have a group of columns with dates in the following format: 2016.01, 2016.02, 2016.03, etc. What is the easiest way to update the headers of each column to the following format: Jan 2016, Feb 2016, Mar 2016, etc.?
The formula to convert "2016.01" to "Jan 2016" is as follows:
DateTimeFormat(DateTimeParse([_CurrentField_],"%Y.%m"),"%b %Y")
I think a good way to apply that in renaming fields would be to use a Dynamic Rename tools with the following formula:
IF REGEX_Match([_CurrentField_],"\d{4}\.\d{2}") THENDateTimeFormat(DateTimeParse([_CurrentField_],"%Y.%m"),"%b %Y")ELSE [_CurrentField_] ENDIF
That basically says that if the field name is in the format ####.## then apply the date rename. Otherwise, leave the field alone.
Hi @navypoint16
Here's the solution that I thought of. Workflow appended.
Cheers,
Thank you! This is very helpful!
One question - in this case, X, Y, Z represents my entire dataset, but how can I replicate this without having to input my entire dataset? In other words, I want to just drop the new dates into cells F5 through AP5 without impacting the dataset.