Icon

Exercise2

<p><strong>Chapter 7/Exercise 2</strong></p><p>In this exercise, we create a course schedule for the next 12 months using a <em>Counting Loop</em>.</p><p>We are asked to schedule one course each month, the first course taking place on January 15, 2011. We use a <em>Table Creator</em> node to input the first date as a String and then convert it to a Date object. Note, that you can also create a single Date value with the <em>Date&amp;Time Range Creator</em> node (specify the start date and set the number count to 1).</p><p>Within the loop, we take the start date and shift the date by x months where x is equal to the current loop iteration. So, in the first iteration we shift the date by 0 months, then 1 month, 2 months, etc. To define the shift value we use a flow variable which we create in the <em>Variable Expression</em> node.</p><p>Lastly, after concatenating all intermediate results, we add the instructor and location to each course.</p>

Nodes

Extensions

Links