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

Filters > Record Selection for dates between

Status
Not open for further replies.

inkbird01

Instructor
Mar 5, 2024
2
0
0
AU
Hi, needing help with filtering only yesterday and todays dates
have tried the following with no luck

{Table.Date} > currentdate -1
{table.Date} = currentdate

Thanks
 
Hi inkbird01 and welcome to TekTips.

It is always helpful to detail the actual result of anything you have tried, rather than saying 'No luck'. Did it return an error? How did the results vary from what you were expecting?

Try the following in the Record Selection Formula:

[Code RecordSelectionFormula]
{Table.Date} = CurrentDate - 1 OR
{Table.Date} = CurrentDate
[/Code]

The approach could be simplified if {Table.Date} is never going to be later than "now" in which case a simple {Table.Date} => CurrentDate - 1 should work.

Please note you may need to change the approach if {Table.Date} is a date/time field rather than a pure date field. In that case try converting the date/time field to a date using Date({Table.Date}).

Hope this helps.

Cheers
Pete
 
If you are not going to acknowledge the assistance and provide feedback on whether it worked or not, I'd suggest you might struggle to get further assistance in the future if you need it.
 
Thanks Pete, I used chat GPT that gave me a better response
 
Maybe you could share the solution for the benefit of others facing a similar challenge.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top