Date filter - this/current month


#1

I cannot figure out how to filter all entries where “date” is the current month.


#2

Hi !
The filter needs a field and a constant (a value)
or
A field and a second field to work.

I don’t think that you can use a formula (?!)

So you may need to first ADD those fields before using them in a filter.

i.e

  • Field “this_month” of type FORMULA
  • Field “Month_of_my_dateField” of type FORMULA

I suggest that you add the year value to the month fields ( i.e. 201610 for october 2016)


#3

You’ll need to do a compound filter.

Make the first line: Where | Date | is on or after | the first day of the month
Make the second line: Where | Date | is on or before | the last day of the month

This will return the results of days between the two dates.

Sadly you’ll have to re-select the dates each month, it’s not automated.


#4

Here’s another way to do it so it automatically switches each month:

  1. Create a formula field in the table called “Is current month”. We want this formula to be 1 when the date is in the current month, and 0 otherwise. So we can use this formula:

    DATETIME_FORMAT({Name of your date field}, 'YYYY-MM') = DATETIME_FORMAT(NOW(), 'YYYY-MM')

  2. Now you can create a filter where “Is current month” is equal to 1.

Here’s a base that shows this set up: https://airtable.com/shr1WzfJyhsdV5HlV/tblY9aNHNVFjtgP1v/viwau4UAl4y9H0DWl


#5

This solution worked perfectly. Thank you!

Would you happen to have a similar solution for displaying all records from the previous month? For example…Today is March 2nd (or any date in March) and I want to see records only from last month (February). Do you have a similar automated solution that will adjust every month? In April, previous month filter will only show March records. May will show April records, etc.