Can't get DateAdd to repeat/loop for a TIME input. Please help?

Hi,

I’m trying to insert data rows of data into a SQL table that adds a time at 15 minute intervals between a user defined start and end time.

i.e. start time = 9am, end time = 5pm, the query should insert every time at 15 minute intervals between those. So 9:00, 9:15, 9:30, 9:45 etc.

I did the same thing with dates in an earlier post using session variable and the WHILE command, and it worked fine. I have followed the same process for Time but it wont work.

It inserts the first time (9am in the above example) and then stops, successfully completing the query.

The server connect component looks like this:

All the variables or inputs are set as type = TIME

To confirm, i am able to use the DateAdd function (with minutes, 15) successfully in a single query… just it doesn’t seem to change the session variable as part of this WHILE loop.

Any help would be greatly appreciated.

Thanks,
Phil

Hi Philip did you find a solution to this problem? i’m in the same situation

Hello,

please try to set the post variable to formatDate

If there is post variables they get treated like strings.