---
title: "How to highlight an entry from a specific date"
date: 2026-04-23
author: "GravityKit"
link: "https://www.gravitykit.com/docs/gravityview/shortcodes/how-to-highlight-an-entry-from-a-specific-date/"
---

## You can use `[gvlogic]` shortcode to compare dates

 In the example below, we highlight today's entries by comparing the date stored on the field "Date B" with today's date (using the Gravity Forms Merge Tag `{date_dmy}`).

 Let's start by adding a [Custom Content field](https://www.gravitykit.com/docs/gravityview/getting-started-gravityview/using-the-custom-content-field/) to our View:

![Entries Fields settings showing columns: Single Line Text A, Date B, and gvlogic with icons](https://www.gravitykit.com/wp-content/uploads/2025/10/file-9SJdldDWmG.png)
*We click the cog icon to configure the contents of the field, then add the following code:*
```
[gvlogic if="{Date B:3:dmy}" is="{date_dmy}"]
	
		It’s Today
	
[/gvlogic]
```

```
[gvlogic if="{Date B:3:dmy}" is="{date_dmy}"]
	span style="background-color: green; color: white; padding: 2px 5px;">
		It’s Today
	span>
[/gvlogic]
```

 The code uses [the `[gvlogic]` shortcode](https://www.gravitykit.com/docs/gravityview/shortcodes/gvlogic-shortcode/) to check whether the date of the "Date B" field is the same as today's date. If so, the code will output HTML that shows the words "It's Today" with a green background.

 Here's how the Custom Content field appears, when configured:

![Code example showing how to highlight text if the current date matches a specific date in the documentation](https://www.gravitykit.com/wp-content/uploads/2025/10/file-cUIwjAiC5n.png)
*And this screenshot shows how the Custom Content field appears in the View:*![Three dates listed; "Today" line highlighted with "It's Today" for September 22, 2022](https://www.gravitykit.com/wp-content/uploads/2025/10/file-cJsHsyYfaU.png)
You can read more about the `[gvlogic]` shortcode and everything possible to achieve here:[Using the  shortcode](https://www.gravitykit.com/docs/gravityview/shortcodes/gvlogic-shortcode/#date-comparison).