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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formula for 07:00 yesterday to 07:00 today

Status
Not open for further replies.

Phillipg

Technical User
May 3, 2002
53
US
Im trying to setup a report that will print reports that have a datetime field that is within 07:00 yesterday and 07:00 today. I want to be able to run this report at any time during the day and allways get that time frame. I can do this with a parameter, but would rather not.
My fields are in the DateTime format. Thanks.
Phillipg
 
Assuming you mean 7:00 am yesterday to 7:00 am today, use this in your record selection formula:
Code:
{Table.DateTimeField} in
//yesterday
DateAdd ("d", -1, DateTime (currentdate, Time (07, 00, 00))) 
to
//currentDate 
DateTime (currentdate, Time (07, 00, 00))
-dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top