Assuming you want to look at the most recent complete period, then the following should work:
(
(
time(currentdatetime) >= time(7,0,0) and
{table.date} in datetime(currentdate-1,time(7,0,0)) to
datetime(currentdate, time(6,59,59))
) or
(
time(currentdatetime) < time(7,0,0) and
{table.date} in datetime(currentdate-2,time(7,0,0)) to
datetime(currentdate-1, time(6,59,59))
)
)
This is a record selection formula--not sure what you were looking for.
-LB