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.
I have looked at many topics, but cannot find what I am looking for.
I want to change the header in the output to the current month automatically. I was *hoping* there would be a way to say "[ThisMonth] Sales" for one column header and "[ThisMonth]-1 Sales", so that it would spit out "November Sales" and "October Sales". I already have all of the data manipulation figured out, so I am focused just on the text of the header of a couple columns.
I want to avoid having to manually change the output file headers every month. I hope I explained that adequately.
DateTimeFirstofMonth(DateTimeStart()) is the 1st day of the month of your job.
DateTimeAdd(DateTimeFirstofMonth(DateTimeStart()),-1,"day") is the Last day of the month of the month before your job ran.
DateTimeFormat(DateTimeAdd(DateTimeFirstofMonth(DateTimeStart()),-1,"day") ),"$b Sales") gets you Oct Sales if run any day in November.
Knowing these facts, I can see how I can calculate column headers based upon the rundate. With these ideas in hand, if you need more assistance, please let us know. Maybe you have some sample data to play with?