PowerApps Filter Items from Last Week

Viewed 259

I'm trying to filter a PowerApps gallery to only return SharePoint items that have a date field with a value equal to last week. My formula is returning an error so I was hoping if someone could kindly help?

Filter (weeks,DateDiff(weekcommencing,Today(),Days), >=7 And <=14)

Many thanks,

Alex.

1 Answers

Assuming that your List is called "weeks", you can use

Filter(weeks,'Date 1' <= Today() && 'Date 1' > DateAdd(Today(),-14,Days))

Where 'Date 1' is your Date column

DateAdd is the function that accepts 'datetime','units to add','units'

Related