Forum Discussion

MarcusMM's avatar
MarcusMM
Copper Contributor
Jan 02, 2026

SYSUTCTRANSBEGINTIME

what about SYSUTCTRANSBEGINTIME with datetime2(7) in SQL Server 2025?

 

6 Replies

  • carlwalk's avatar
    carlwalk
    Copper Contributor

    I don’t think SYSUTCTRANSBEGINTIME column exists , checked SQL Server 2025 docs, nothing there. 
    You can try this
    SELECT 
        transaction_id, 
        CAST(transaction_begin_time AS datetime2(7)) AS precise_time
    FROM sys.dm_tran_active_transactions;

  • MarcusMM's avatar
    MarcusMM
    Copper Contributor

    sys.dm_tran_active_transactions has Transction Start Time with DataType datetime on SQL Server, but I need datetime2(7)

    so my question is if there is a function SYSUTCTRANSBEGINTIME supplying datetime2(7)

    Regards Marcus

  • SivertSolem's avatar
    SivertSolem
    Iron Contributor

    I fail to understand what you're asking about.

    Maybe you have some context you could provide for your question.

    • MarcusMM's avatar
      MarcusMM
      Copper Contributor

      sys.dm_tran_active_transactions has transaction_begin_time with DataType datetime on SQL Server, but I need datetime2(7)

      So the Question is: is there a dm_tran_active_transactions-Column or function SYSUTCTRANSBEGINTIME with datetime2(7) in SQL Server 2025?

      Regards Marcus

      • MohammedU's avatar
        MohammedU
        Copper Contributor

        You can try converting the sys.dm_tran_active_transactions.transaction_begin_time column to UTC but you will NOT get the datetime2 output.

        SELECT
            transaction_id,
            transaction_begin_time AS local_time,
            DATEADD(
                MINUTE,
                DATEDIFF(MINUTE, SYSDATETIME(), SYSUTCDATETIME()),
                transaction_begin_time
            ) AS transaction_begin_time_utc
        FROM sys.dm_tran_active_transactions;

Resources