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
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
Hi,
It would help us a lot if you provide us with the aggregate you are struggling with.
Source
https://tinypic.com/view.php?pic=xo1dag&s=9#.WPdNf9LyuUk
Filter
https://tinypic.com/view.php?pic=112am8g&s=9#.WPdNqNLyuUk
Entity
https://tinypic.com/view.php?pic=30troqu&s=9#.WPdN29LyuUk
Table
https://tinypic.com/view.php?pic=2llnm0p&s=9#.WPdOCtLyuUk
Hope this help
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,
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
https://tinypic.com/view.php?pic=1nyau9&s=9#.WPd0VdLythE
Sry if i am doing this wrong.
Tks for the help!
It worked!
Really helpfull Justin, tks a lot!
I have created below filters & it is working perfect :)
Notifications is my Local Table:
Today:Notifications.notification_date = FormatDateTime(CurrDate(),"yyyy-MM-dd")Last Month:Notifications.notification_date >=NewDate(If(Month(CurrDate()) =1,Year(CurrDate())-1,Year(CurrDate())),If(Month(CurrDate())-1 > 0,Month(CurrDate())-1,12),1)andNotifications.notification_date < NewDate(Year(CurrDate()),Month(CurrDate()),1)LAST WEEK:Notifications.notification_date >= NewDate(Year(AddDays(CurrDate(),-DayOfWeek(CurrDate()))),Month(AddDays(CurrDate(),-DayOfWeek(CurrDate()))),Day(AddDays(CurrDate(),-DayOfWeek(CurrDate()))))
Thanks,
Assif