DateTimeZone.LocalNow

DateTimeZone

Returns the current local date and time with UTC offset as a datetimezone value.

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

Syntax

DateTimeZone.LocalNow() as datetimezone

Return Value

datetimezoneThe current local date, time, and UTC offset.

Remarks

DateTimeZone.LocalNow returns the current local date and time including the UTC offset as a datetimezone value. Unlike DateTimeZone.FixedLocalNow(), this function may return different values if called at different points during a long-running query evaluation — each call captures the clock at that moment. For a consistent snapshot across all rows and calls, use DateTimeZone.FixedLocalNow() instead.

In Power BI Service scheduled refreshes, the "local" time reflects the time zone of the on-premises gateway (for gateway-connected data sources) or the cloud region's system time (for cloud connectors and imported data). This is often UTC or a cloud region's configured timezone, not the developer's local machine timezone. Always test cloud refresh behavior to confirm the offset is what you expect.

DateTimeZone.LocalNow() is most useful in ad-hoc M expressions where you need the current moment with its offset and a single call is sufficient. For calculated columns or queries where multiple rows must share the same "now" reference, always capture DateTimeZone.FixedLocalNow() in a let binding and reference that variable.

Examples

Example 1: Show current local time with timezone offset

#table(
    type table [LocalNow = datetimezone],
    {{DateTimeZone.LocalNow()}}
)
Result
LocalNow
13/8/2026 4:00:00 PM

Example 2: Add a refresh timestamp column using the fixed variant

let
    RefreshTime = DateTimeZone.FixedLocalNow()
in
    Table.AddColumn(
        Table.SelectColumns(Table.FirstN(Sales, 3), {"OrderID"}),
        "RefreshedAt", each RefreshTime, type datetimezone
    )
Result
OrderID
RefreshedAt
113/8/2026 4:00:00 PM
223/8/2026 4:00:00 PM
333/8/2026 4:00:00 PM

Example 3: Filter orders from the current calendar day using local time

let
    Today = Date.From(DateTimeZone.LocalNow())
in
    Table.SelectRows(Sales, each [OrderDate] = Today)
Result
OrderID
CustomerName
Product
Category
UnitPrice
Quantity
OrderDate
Region

Compatibility

Power BI Desktop Power BI Service Excel Desktop Excel Online Dataflows Fabric Notebooks