Widget Date In Statement?

Hello, well my question is this, I want to do a search for dates by entering the date range to show me the activities that took place at that time, on this subject I have ideas but what is not is how to perform the search to travez of the inserted dates, I mean I have dated the widget but not how to introduce them in a sql statement to run search

if anyone could help me I would appreciate