How to Display Date and Time Correctly in a Workflow E-mail Notification
This short guide explains how to correctly display a value from a Date and Time field in a workflow e-mail notification, so the time in the e-mail matches the time shown in the application table.
When to Use This
Use this approach when you insert a Date and Time field into a workflow e-mail notification and the received e-mail shows a different time than the table.
Typical example:
- the table shows 13.05.2026 11:08:00,
- but the e-mail notification shows 2026-05-13T09:08:00Z.
The Z at the end means that the value is displayed in UTC time. Because of that, the time in the notification can be, for example, 2 hours earlier than the time displayed in the application.
1. Create a Date and Time Field
First, create a simple field of type Date and Time in your table.
In this example, the field is called:
Date and time
Then fill in the value in a record. For example:
13.05.2026 11:08:00
This value is displayed in the table according to the application localization settings.
2. Create a Workflow Automation
Next, create a workflow automation that is triggered, for example, when a new record is created or an existing record is changed.
The goal of the automation is to send an e-mail notification that contains values from these fields:
- Status
- Date and time
You can start with an e-mail body like this:
Test e-mail body
State: ${doo.model["status"]?.value ?? ""}
Date and Time: ${doo.model["dateAndTime"]?.value ?? ""}
You can insert the fields into the e-mail body in the standard way by clicking the Fields button and selecting the required fields.
3. The Problem: Time in the E-mail Does Not Match the Table
After saving the workflow and triggering the automation, the e-mail is sent successfully. However, the value from the Date and time field may look different in the e-mail.
For example, the table shows:
13.05.2026 11:08:00
But the e-mail shows:
2026-05-13T09:08:00Z
This means the value is printed in UTC format. As a result, the time in the e-mail does not match the time the user sees in the application table.
4. Solution: Use doo.functions.date.toDateTimeStringApp
To display the date and time in the notification in the same format as in the application, convert the value using this function:
doo.functions.date.toDateTimeStringApp
Instead of inserting only the raw field value, use this expression in the workflow e-mail body:
${doo.model["dateAndTime"]?.value ? doo.functions.date.toDateTimeStringApp(doo.model["dateAndTime"]?.value) : ""}
The full e-mail body can look like this:
Test e-mail body
State: ${doo.model["status"]?.value ?? ""}
Date and Time: ${doo.model["dateAndTime"]?.value ? doo.functions.date.toDateTimeStringApp(doo.model["dateAndTime"]?.value) : ""}
This expression first checks whether the Date and time field has a value. If it does, the value is converted to the date and time format used by the application. If the field is empty, an empty text is displayed instead.
5. Check the Application Localization Settings
To make sure the date and time are displayed correctly, also check the application localization settings.
You can find the localization settings in the application settings. See the documentation here
In this example, the important setting is the application time zone. Set it to:
Europe/Prague
The date and time format can also be adjusted in the same section, for example:
- Date format: DD.MM.YYYY
- Time format: 24
If the application time zone is set correctly, the doo.functions.date.toDateTimeStringApp function displays the value according to the application localization.
6. Result
After updating the e-mail body and checking the application localization, the date and time in the notification will match the value displayed in the table.
For example:
State: New
Date and Time: 13.05.2026 11:08
This fixes the issue where the e-mail previously displayed the UTC value, for example:
2026-05-13T09:08:00Z
Summary
If you want to display a Date and Time value in a workflow e-mail notification exactly as it appears in the application, do not use only the raw field value.
The raw value can be displayed in UTC format.
Use this function instead:
doo.functions.date.toDateTimeStringApp
Recommended expression:
${doo.model["dateAndTime"]?.value ? doo.functions.date.toDateTimeStringApp(doo.model["dateAndTime"]?.value) : ""}
Also make sure the application has the correct time zone set in localization, for example Europe/Prague.