---
title: "How to compare two dates and display the difference on the Active Console"
description: "Comparing two dates and displaying their difference on the Active Console involves using the parseDate() function in gateway rules. This process converts dates to epoch time, calculates the difference in seconds, and updates a target cell with the result."
url: "https://docs.itrsgroup.com/docs/faq/geneos/115004029929-geneos-how-to-compare-two-dates-and-display-the-difference-on-the-active-console/index.html"
---
**You can achieve this in gateway rules with parseDate() function. You can try the following steps:**  **Steps:**

1. Create a gateway rule with the Target XPath pointing to a blank cell

2. Add path aliases for the two cells that you would want to compare

3. Convert both of their time values into epoch time by using the parseDate() function, and calculate their difference

4. Update with the value statement. The result is in the format of a number of seconds.

Refer to below screenshot:  **Gateway Rule Code Block**  ![Screenshot](https://docscdn.itrsgroup.com/faq/images/geneos/115004029929-inline-1-mceclip2.png)  **Path Alias**![Screenshot](https://docscdn.itrsgroup.com/faq/images/geneos/115004029929-inline-2-mceclip1.png)  **Dataview**  ![Screenshot](https://docscdn.itrsgroup.com/faq/images/geneos/115004029929-inline-3-mceclip0.png)

## Further Reading

- [parseDate() function](https://docs.itrsgroup.com/docs/geneos/current/processing/monitoring-and-alerts/geneos_rulesactionsalerts_tr/index.html#parseDate) in Gateway Rules - [Time Formatting Parsing Codes](https://docs.itrsgroup.com/docs/geneos/current/processing/gateway-administration/geneos_timeformats_tr/index.html#Time_Formatting_Parsing_Codes) for use in the parseDate() function.


