Something along the lines of
Set Field [ Table::date ; $dateBegin + $i ]
Set Variable [ $i ; $i + 1 ]
Exit Loop if [ $dateBegin + $i > $dateEnd ]
where you should obviously perform some error checking beforehand, like $dateBegin not being empty and <= $dateEnd.
first, make sure you are in the right context (use a Go To Layout if necessary)
When you subtract the two dates you'll get a number. That's going to be your maximum number of iterations in your loop (need to add 1 if you want both dates included)
set a counter variable to 0
Now start a loop
set a date variable to your start date + the counter
create a new record
set the date variable in the date field
increment the counter
exit the loop if the counter >= your max number
end the loop
you may have to tweak the "exit loop if" a bit to make sure the right number of records are created
Then, of course, if you're creating 'calendar' records - such as for scheduling - you may have a master list of dates that are holidays (to skip) and have the option to skip or include weekend days. But that gets a whole other set of testing inside the loop before the "create new record".
Thank you Erolst, Wim and Beverly.