Hi I have a work flow where Month 1 is current Month, Month two is current Month + 1 and so on up until 30 months from now.
How do I rename these columns that Month 1 is July 2024, Month 2 is August 2024 and so on... but this is changing each month so next month when I run the report I would need month 1 to be August 2024, Month 2 to be September 2024 etc...
@CM246
I assume your current field Name willbe Month+ Digit, the then seperate the number out then together with DdateTime Fuction, we can transform it to the format you need.
note we need also the "Month Year" in numeric format so the order of fields is correct.
Hey @CM246, if your field names are actually currently 'Month 1', 'Month 2' and so on then this is what I've come up with. This parses out the number in 'Month N', adds that amount of months -1 to the current date and then formats this as 'Month Year' i.e. January 2020:
DateTimeFormat(
DateTimeAdd(
DateTimeToday(),
ToNumber(
Regex_Replace([_CurrentField_],'\D','')
)-1,
'month')
,'%B %Y')
Another way using the field info tool.
if [Name] = 'Month 1' then datetimeformat(datetimenow(),'%B %Y') elseif startswith([Name],'Month') then datetimeformat(datetimeadd(datetimeparse([Row-1:Date],'%B %Y'),1,'month'),'%B %Y') else [Name] endif
Is there a way to replace anywhere it says Month 1, Month 2 etc?
The Fields aren't just Month 1, Month 2 but are:
Month 1 Open PO
Month 1 Finance Projection
Month 1 Planned Orders etc...