Increase day of date string by X with Java Edit Variable


I've got a start date as a string (yyyy-MM-dd) as a variable in a loop. This date should be increased based on another variable called "days diff" but in the Java Edit Variable node I continuesly receive "cannot be resolved to a type".

The approach postet in this topic give me the same as this apprach:

LocalDate sDate = LocalDate.parse(v_startDate);

// add one day
LocalDate eDate = sDate.plusDays(v_currentIteration);
out_currentDate = eDate;

Thanks a lot

Hey folks,

I was able to succeed. Though, I'd like to ask for your thoughts maybe you got some handy improvements or other thougts.

The main purpose is to:

  1. Prevent sampling in Google Analycts by crawling to hughe chunks of data
  2. Prevent closed API connection due to too long Google Analytics API calls
  3. Thus crawling date day wise for a time period and
  4. Crawl all results per day per 10k results in one call (Google Analytics API limit)

Attached the workflow.

Many thanks & kind regards

Hi Mike,

nice workflow!

I think I would change one thing. You currently use a counting loop and generate the new start end , end date inside the loop.

I would generate a list of start and end dates. (counter -> date/Time Shift) and use the chunk loop start node.

However, this is mainly simplifiying the workflow a little bit. 

Best, Iris