DateTimeZone.UtcNow

DateTimeZone

Returns the current date and time in UTC.

Examples on this page use shared sample tables. View them to understand the input data before reading the examples below.

Syntax

DateTimeZone.UtcNow() as datetimezone

Return Value

datetimezone — The current UTC date and time.

Remarks

DateTimeZone.UtcNow returns the current date and time in UTC (Coordinated Universal Time) with a +00:00 offset. The value changes each time the query runs, so it cannot be used for reproducible results. It is commonly used for adding refresh timestamps or computing elapsed time relative to a fixed reference point.

Examples

Example 1: Display the current UTC datetime

#table(
    type table [CurrentUTC = datetimezone],
    {{DateTimeZone.UtcNow()}}
)
Output
CurrentUTC
17/15/2024 3:30:00 PM

Example 2: Add a UTC refresh timestamp to Sales

let
    UtcNow = #datetimezone(2024, 7, 15, 15, 30, 0, 0, 0) // DateTimeZone.UtcNow()
in
    Table.AddColumn(
        Table.SelectColumns(
            Table.FirstN(Sales, 3),
            {"OrderID", "CustomerName"}
        ),
        "RefreshUTC", each UtcNow, type datetimezone
    )
Applied Steps

The final output — the first 3 Sales orders (OrderID and CustomerName) with a RefreshUTC column holding the same timestamp on every row.

OrderID
CustomerName
RefreshUTC
11Alice7/15/2024 3:30:00 PM
22Bob7/15/2024 3:30:00 PM
33Charlie7/15/2024 3:30:00 PM

Compatibility

✓ Power BI Desktop✓ Power BI Service✓ Excel Desktop✓ Excel Online✓ Dataflows✓ Fabric Notebooks
Contributors
kyleamueller