> ## Documentation Index
> Fetch the complete documentation index at: https://docs.equals.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Date matching formulas

> Three formulas make date-based comparisons easier and more intuitive. Use , , and  to convert any date value into it’s respective week, month, or year.

Previously, you'd need to:

* Extract the week number and year from your date field in order to reference it in your formula.
* Now, write your formula to match on both week number and year: `=countifs(D:D,weeknum(H2),E:E,year(H2))`.

![](https://mintcdn.com/equals/rY-jt2rKiL-81FoS/images/docs/af771945c453272285f2bc69439a48fcf3241bedc9004f4411d5ced96e859262-infinity_sheet_1.png?fit=max\&auto=format\&n=rY-jt2rKiL-81FoS\&q=85\&s=78e5275eb3b71e8417a1801920d9aa73)

Now, you can:

* Skip the calculated column and enclose the date value in a MATCHWEEK / MATCHYEAR formula: `=countifs(A:A,matchweek(F2),A:A,matchyear(F2))`.

![](https://mintcdn.com/equals/i4fADVD49syZwhQ2/images/docs/39c9c9e014bb6deb7defb25b39e66feb88b3f1cab8fd65682a59abecfa7c1288-infinity_sheet_2.png?fit=max\&auto=format\&n=i4fADVD49syZwhQ2\&q=85\&s=2a18c6c49ccd401398184aa757f42629)

***

[Working with dates](https://docs.equals.com/docs/working-with-dates.md)

[Calculated columns](https://docs.equals.com/docs/calculated-columns.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.