How to enable and show the label only to the specific time interval?

How to enable and show the label only to the specific time interval?

We can set the following date fields under the Label Information tab.
  1. From: set the from date. Leave blank to skip this condition.
  2. To: set the to date. Leave blank to skip this condition.
For example,
  1. From: 01/01/2021, To: blank
    1. The label will show from 1st Jan 2021 onwards
  2. From: blank, To: 31/12/2021
    1. The label will show till 31st Dec 2021
  3. From: 01/01/2021, To: 31/12/2021
    1. The label will show from 1st Jan 2021 to 31st Dec 2021