Can the date format in SQL Server 2022 Agent notification emails be changed?

Ananthu GP 5 Reputation points
2026-09-30T13:04:01.6066667+00:00

SQL Server Agent’s standard notification emails on several SQL Server 2022 instances display timestamps in US format:9/30/2026 at 10:15:54 AM

Windows regional settings and the SQL Server Agent service-account profile are configured for English (United Kingdom), with dd/MM/yyyy and 24-hour time.

Comparable SQL Server 2017 instances display the expected UK format:30/09/2026 at 10:15:54

These are the notification alert emails generated by SQL Server Agent, not custom Database Mail messages.

Can the timestamp format in the built-in SQL Server Agent notification be configured in SQL Server 2022, or is the US format expected behaviour?

SQL Server | Other
SQL Server | Other

Additional SQL Server features and topics not covered by specific categories

0 comments No comments

3 answers

Sort by: Most helpful
  1. Engla Wahlberg Burlin 80 Reputation points
    2026-09-30T13:09:37.2766667+00:00

    I am not aware of any documented setting that controls the date/time format used in built-in SQL Server Agent notification emails. The Microsoft documentation for SQL Server Agent mail and alert configuration does not appear to mention a configurable timestamp format.

    If the US format is causing operational issues, a possible workaround would be to replace the built-in SQL Server Agent notifications with custom notifications sent through Database Mail, where the message content and date formatting can be controlled by your own T-SQL logic.

    Since you are seeing UK formatting on SQL Server 2017 and US formatting on SQL Server 2022, it may also be worth checking whether this behavior changes after applying the latest SQL Server 2022 CU. If the behavior persists across fully patched SQL Server 2022 instances, it could indicate a product change or regression rather than a configuration issue.

    Was this answer helpful?

    1 person found this answer helpful.

  2. Erland Sommarskog 137.6K Reputation points MVP Volunteer Moderator
    2026-09-30T13:34:24.3166667+00:00

    Database mail is not my not speciality. I made an attempt to set it up on my machine to test, but it did not really work out. We have database mail set up at my client, but I would not be surprised if the applicable settings are US English, so little point in testing.

    However, if you get the right format on SQL 2017 and the wrong format on SQL 2022, I am quite sure that it is a local issue. I can't imagine that Microsoft would change this between versions. You say that Windows regional settings and the service account for Agent has UK format. I would double-check the format for the service account. And I would check the system locale. Go to Region under the Control Panel. Select the Administrative tab and check "Language for non-Unicode programs". You want that to be English (United Kingdom). If not click the button Change System Locale. Note: You need to restart Windows for the change to take effect.

    By the way, what does "SELECT @@version" return?

    User's image

    Was this answer helpful?


  3. Senthil kumar 2,580 Reputation points
    2026-09-30T13:13:49.7766667+00:00

    Hi @Ananthu GP

    If a UK format is required, the usual approach is to bypass the built-in notification body and instead:

    • Send a custom Database Mail message from a job step using sp_send_dbmail.
    • Use an alerting framework that generates its own email content.
    • Use custom failure-handling jobs/stored procedures where the timestamp can be formatted explicitly (FORMAT(...,'dd/MM/yyyy HH:mm:ss','en-GB')).

    If this change in behavior is important for your environment, it may be worth checking the specific SQL Server 2022 CU level and searching Microsoft feedback/known issues, as the difference between 2017 and 2022 suggests a product behavior change rather than a configuration issue.

    Thanks.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.