Hello Good evening I would like to know more or less what I am doing wrong in this function that I did to insert a number of records depending on the period placed, for exam