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!

Yesterday's Data selection

Status
Not open for further replies.

plextor

IS-IT--Management
Jan 7, 2003
34
US
I'm attempting to create a record selection formula that selects the previous day's data from 12:00am to 12:00pm. I tried to create something that only selects the date and ingores the time but, it doesn't work properly: Here's what i tried so far.

{amTicket.dtOpened} >=

cdatetime(year(currentdate-1),month(currentdate-1),day(currentdate-1),0,0,0) and
{amTicket.dtOpened} <= cdatetime(year(currentdate-1),month(currentdate-1),day(currentdate-1),23,59,59)

Thank you.
Brian
 
Try this:
Code:
{amTicket.dtOpened} =  CurrentDate - 1

Place it in your Record Selection Criteria.

~Brian
 
It's acting the same way.

Is their a way to also select a time range within the forumla. For example 12am to 12pm..

Thanks again.
Brian
 
Try this:

{amTicket.dtOpened} > CurrentDate - 1 and
{amTicket.dtOpened} < CurrentDate

-D
 
Try:

(
{amTicket.dtOpened} >= cdatetime(year(currentdate),month(currentdate),day(currentdate),0,0,0)
and
{amTicket.dtOpened} <= cdatetime(year(currentdate),month(currentdate),day(currentdate),12,0,0)
)

-k
 
Thank you very much... That did the trick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top