mcbane
4 years agoContributor
Javascript for loop using date as counter
Hi. I'm trying to create a for loop using a date starting with 1/1/2021 and going to today's date as below: for(var d = aqDateTime.SetDateElements(2021, 01, 01); d <= aqDateTime.Now(); aqDateTime...
- 4 years ago
Hi,
> It's staying constant at 01/01/2021.
It stays constant because you do not change it.
Try this:
for(var d = aqDateTime.SetDateElements(2021, 01, 01); d <= aqDateTime.Now(); d = aqDateTime.AddDays(d, 1))