Query Last 12 Mos
Date: 12.02.14 - 4:39am
for my web humidor project I wanted to generate a bar graph with the last 12 months of data. I wanted the data to display in a rolling format where the current month was at the rightmost position then going back in time for the 12 previous months.
I do not use date-time functions very often and wasn't sure how to do this. Below is a snippet of code I cooked up for the task. It took a little bit of fidgeting to get right so thought I would share it.
in this example 3 empty by reference arrays are passed in, these are the out values and would end up being, separated value list of the data I wanted for the bargraph.