Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Range based on print date 2

Status
Not open for further replies.

er123

IS-IT--Management
Aug 21, 2009
9
US
What would be the formula for a date range that references the most recent 7am-7am period from the print date?
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top