Hello!
I have two dates, 01jan2020 and 31aug2021. Similarly, I have two variables for targets, tar_1 and tar_2, both indicating the number of sells need to be made in 2020 and 2021, respectively. How do I calculate the number of months from 01jan2020 - 31dec2020, multiply it by the monthly target for 2020, do the same for the other date using tar_2, and then sum the two to obtain the target needed to be achieved between 01jan2020 and 31aug2021? This is my first time using this forum, so apologies if I have phrased my query weirdly.
Just for reference, I have a multiple pairs of dates. If I can figure out how to find the months between two dates, I will be able to perform the rest of the task using a loop. Thanks!
I have two dates, 01jan2020 and 31aug2021. Similarly, I have two variables for targets, tar_1 and tar_2, both indicating the number of sells need to be made in 2020 and 2021, respectively. How do I calculate the number of months from 01jan2020 - 31dec2020, multiply it by the monthly target for 2020, do the same for the other date using tar_2, and then sum the two to obtain the target needed to be achieved between 01jan2020 and 31aug2021? This is my first time using this forum, so apologies if I have phrased my query weirdly.
Just for reference, I have a multiple pairs of dates. If I can figure out how to find the months between two dates, I will be able to perform the rest of the task using a loop. Thanks!
Comment