Generate rows in DataTable from the given date range


I just came across an issue. I need to generate rows in a new datatable based upon the date columns in the given datatable.

Here’s how it is:


and I need a new table like this:


There are other columns in the first datatable as well but there values are same for the defined date range. I’m able to replicate the rows, but am having trouble in putting the date values like this.

I shall be very grateful for your kind support!


Use a Do While to loop, adding a day each time (with the DateAdd function), and the condition of the Do While would be that the current date it’s processing is less than or equal to “To Date”

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.