This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Hi there
I have a file that only shows last month data in the file but I also want to create a time-series file of trended data too. However the field that comes in the file each month is just called Actual YTD (and this name doesn't change month on month) and we know it's for that previous month. I am guessing I would need to rename that column before I output it in the trended file to be the month. How do I do this? How do I know which month it is.
What I have done so far is attached a dynamic rename and I renamed that field to DateTimeNow() but obviously Id want it to be last month. I then wanted to rename that column to the text version of the date eg. Sep-2018.
1. How do I rename that column to be called the last month (in date format or in text format)
2. If done in date format, how do I rename it back to the text format?
Thanks
Anjum
If you set the output format of the the DateTimeNow() tool to yyyy-MM-dd, then the following formula will give you the column name for the prior month.
ToString(DateTimeFormat(DateTimeAdd([DateTimeNow],-1,'Months'), '%b-%Y'))