Check data added within this week

I’m a new user I glide, can I check the data which is added within this week?
When i use related date for checking, it shows 6 days or 1 weeks, so that i can’t use the if condition to count. Can anyone help me? Thanks

This requires you to first create an if then else column where the data resides checking to see if the date is within the week. If so, the if then else column should result in the value you were originally using to make the relation.

To check if the date is within the week:

  1. Create a math column with this formula:
    year(now)*100+weeknum(now)-year(date)*100+weeknum(date)
    replace now with the Now value and the date value with the timestamp of the data.
  2. This should result in 0 if the timestamp is within the week.
  3. The if then else column should check if the math column is 0

If the date column is just a type in data, the result also be as 0?
I followed the step you given, the result in math column is 2x. I think I can’t say it clear, I have an example, I type a date “2022-03-08”, I got the result in Math column is “24”.

This is just a math order of operations issue (PEMDAS). You just need to add a couple sets of parenthesis to make it work correctly. This should work:

(year(now)*100+weeknum(now))-(year(date)*100+weeknum(date))

3 Likes

Parenthesis. Of course :slight_smile:

1 Like

Thanks for your great help🙏

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.