---
title: "How to include current date in email subject line when using libemail.so"
description: "Including the current date in email subject lines uses the printDate function in the Rule block. Define %(CURRENT\\DATE) in the subject and format the date within the printDate function."
url: "https://docs.itrsgroup.com/docs/faq/geneos/115004022805-geneos-how-to-include-current-date-in-email-subject-line-when-using-libemail-so/index.html"
---
In the Rule block, add the following:  set $(DATE) printDate("%d %B %Y", now()) userdata "CURRENT\_DATE" $(DATE)  ![Screenshot](https://docscdn.itrsgroup.com/faq/images/geneos/115004022805-7121827486877-mceclip2.png)  In Action, you can define "%(CURRENT\_DATE)" as part of the subject  ![Screenshot](https://docscdn.itrsgroup.com/faq/images/geneos/115004022805-360036389634-mceclip0.png)  Under static parameters:  ![Screenshot](https://docscdn.itrsgroup.com/faq/images/geneos/115004022805-7121766942365-mceclip1.png)  The same can also be used within the email body, under \_FORMAT.

\*\*\*The DATE and CURRENT\_DATE variables are user defined.  \*\*\*The format of the date is defined within the [printDate](https://docs.itrsgroup.com/docs/geneos/current/processing/monitoring-and-alerts/geneos_rulesactionsalerts_tr/index.html#printdate) function.  \*\*\*The [userdata](https://docs.itrsgroup.com/docs/geneos/current/processing/monitoring-and-alerts/geneos_rulesactionsalerts_tr/index.html#user-data) definition must be within the rule block's "if" statement.


