Get data with more than a week

Get data with more than a week

  

Hi guys!


I am trying to create a filter to get data with more than a week to a table, i mean, all content created before that, but i am not getting there. 



Any help will be good!

Cheers



Hi,


It would help us a lot if you provide us with the aggregate you are struggling with.


Hi Gatts,

You would use the AddDays() built in function passing in your date and -7 to go back a week.

So something like Assistencia.Data < AddDays(CurrDate(), - 7)

Let me know if you have any trouble,

Justin

Yeah, i tried that before too.

But the < operator cannot work with date or datetime.


Tks!

I use the > and < comparators with dates all the time. What leads you to think this doesn't work?

Error

http://tinypic.com/view.php?pic=1nyau9&s=9#.WPd0VdLythE


Sry if i am doing this wrong.


Tks for the help!

Solution

That error is because you are trying to compare a Date to a DateTime, so you need to convert the date time to date using the built in function 'DateTimeToDate()'

DateTimeToDate(AddDays(CurrDate(), -7))

Let me know if you have any other troubles,

Justin

Solution

It worked!


Really helpfull Justin, tks a lot!