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

Multiple time functions on the same day ??? 1

Status
Not open for further replies.

sxmnl

Technical User
Joined
Dec 17, 2002
Messages
28
Location
US
My report runs every day @ 7:am. I need to go back in time -24 hrs and just grab the times 7:am, 13:00, 1900: 01:00 and the data associated with those times ????? I have tried the help but thats why I'm here. Any help would be great.

Thanks
 
Provide sample data and desired output.

You can use the record selection formula (Report->Edit Selection Formula->Record)

and place something like:

{MyTable.MyDatetimefield} = datetime(year(currentdate-1),month(currentdate-1),day(currentdate-1),7,0,0)

to get just those rows dated yesterday at 7AM.

If you want a range of times, use something like:
(
{MyTable.MyDatetimefield} >= datetime(year(currentdate-1),month(currentdate-1),day(currentdate-1),7,0,0)
)
and
(
{MyTable.MyDatetimefield} <= datetime(year(currentdate-1),month(currentdate-1),day(currentdate-1),13,0,0)
)

This would get all rows dated for yesterday from 7:00AM to 1PM

-k kai@informeddatadecisions.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top