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!

Last two weeks code 2

Status
Not open for further replies.

gennaroalpha7

Technical User
Nov 28, 2012
253
US
Hello -

I have a report that I would like to generate for the last two weeks of (tickets) data. Here is the code that I have so far...

Code:
Date ({CallLog.RecvdDate})>= Lastfullmonth and
not ({CallLog.CallType} in ["ATM Night Bag", "ATM Debit Card", "ATM", "Dispenser", "Password-Laptop", "Password-Lan.", "Password-Lan", "Password-App", "Password.....", "Password....", "Password.", "Password -FC8", "Password"])

Would it be appropriate to use this new code to generate the last two weeks of data?

Code:
DateAdd("d",-14,CurrentDate)

instead of:

Code:
Date ({CallLog.RecvdDate})>= Lastfullmonth

And, when I plug in the new code it says 'A boolean is required here'. My new code is like this:

Code:
DateAdd("d",-14,CurrentDate) and
not ({CallLog.CallType} in ["ATM Night Bag", "ATM Debit Card", "ATM", "Dispenser", "Password-Laptop", "Password-Lan.", "Password-Lan", "Password-App", "Password.....", "Password....", "Password.", "Password -FC8", "Password"])

I am learning, slowly but surely. Thanks for your help.

Alphaseven

 
i am probably not giving this the necessary amount of thought, but just off the top of my head, try the below instead of "DateAdd("d",-14,CurrentDate)"

(Date ({CallLog.RecvdDate}) in [DateAdd("d",-14,CurrentDate) to currentdate])
 
I would do I this way:

Code:
Date({CallLog.RecvdDate}) >= (CurrentDate - 14) and
not ({CallLog.CallType} in ["ATM Night Bag", "ATM Debit Card", "ATM", "Dispenser", "Password-Laptop", "Password-Lan.", "Password-Lan", "Password-App", "Password.....", "Password....", "Password.", "Password -FC8", "Password"])

Cheers
Pete
 
Thank you pmax9999 and fisheromacse. Have a good one. :)

Alphaseven
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top