How to loop through dates in a macro

I have need of a macro that needs to search through all values in a database for a certain time interval and pull out the maximum value of the search parameter and the time at which it occurs. I have the GUI that gets the user input for the time and other need-to-knows. The time is in the format of xx/xx/xxxx fro the date field, and xx:xx:xx for the time field. I have two questions: One is how would one go about putting these together to make a single variable fro date and time; and two, would be how one would transform this value into unix epoch time. (format xxxxxxxxxxxx , or something like that)

If that cannot be done, I need to know how one can loop through dates.

Thank you.

As written your question is not clear enough to provide any suggested advise. Please revise it to say exactly what the inputs and expected outputs are and break down any steps in-between that you think are necessary. When you use the word Time make sure you mean time only and not date-time. When you say what the inputs are say what database you’re using, and what the fields types are that are involved. This is not a site to write code for you, but rather to help you write your own code.