# How to apply a date filter in LibreOffice

libreoffice-calc

I have a Calc-sheet where the first column is a date and the second column a description of a task. I would like to filter the table so only the task with a date equal to today and the future will be shown.

For example if the dates where 01-01-2010 and 01-01-2013, then 01-01-2013 should be visible, but the 2010 should be hidden.

Here's a solution using an advanced filter. First, you need to define the filter criteria. After this, you can apply the filter to your data.

The filter criteria definition for an advanced filter is a simple table using the same structure of your data. You can put that data table on the same Calc sheet as your data.

Since you want to filter your data dynamically, you'll have to define the filter dynamically, too (if you don't want to update the filter criteria manually). To do so, enter a calculation to get the current date.

In the following screenshot, cell B10 has the content =NOW(), resulting in the current date. The search criteria is defined in A7:B8 (yellow background). A8 is defined as the result of this formula: =CONCATENATE(">=";B10). The date part of the resulting string is displayed not as date but as Calc's internal numeric representation of the current date. You may add a name to filter area range to make it easier to reference it.

Now, with the filter criteria created, you can apply the filter using Menu Data -> Filter... -> Advanced filter:

Enter the cell range of the filter criteria and hit OK.

That's it - as result, only tasks with date >= now will be shown:

To remove the filter, Select Remove Filter from Menu Data -> Filter.