To get today’s date in Power Query, use the M expression Date.From(DateTime.LocalNow()). It reads the current date and time from the environment running the query, then returns only the date; the value updates when the query is refreshed, not continuously like a live clock.
The quickest way to return today’s date
In Excel for Microsoft 365 on Windows, open the query in Power Query Editor, select Add Column > Custom Column, and enter Date.From(DateTime.LocalNow()) as the custom column formula. Give the new column a useful name, such as RefreshDate, and select OK. The expression is Power Query M, not an Excel worksheet formula, so it does not need a leading equals sign in the Custom Column box.
This adds one date value to each row in the result. For example, if the query evaluates on November 2, 2026, the result is November 2, 2026 for the rows evaluated at that time. The displayed style may look different depending on the column’s type and regional formatting, but the underlying value is a date rather than text.
If you want the query to return a single date rather than add a column, create a blank query and enter the expression in the formula bar or Advanced Editor. A single-value query can be useful as a query parameter or helper, although it is not usually the right shape to load as a normal table.
How Power Query gets the current date
Power Query uses the M language, which has functions for dates, times, and time zones. DateTime.LocalNow() supplies a date-and-time value based on the local clock available to the query. Wrapping it in Date.From(...) discards the time portion and produces a date value that can be compared with other dates.
That distinction matters. A date-and-time value such as November 2, 2026 at 3:45 p.m. is not identical to a date value such as November 2, 2026. If you compare a date-only field to a date-and-time value, the different types or a non-midnight time can make a filter behave unexpectedly. Extracting the date first is usually the clearest approach when the question is simply whether a record is from today.
Power Query evaluates expressions as part of a query evaluation. It does not keep a cell-style formula running in the background. If a workbook is left open overnight, a query column that used the prior day’s date does not automatically change at midnight; refresh the query to evaluate it again.
Add the date to a table or use it in a filter
A custom column is a straightforward choice when every output row needs a refresh date. In Power Query Editor, choose Add Column > Custom Column, enter the M expression, and then check that the new column has the Date data type. You can set the type using the data-type control in the column header or through Transform > Data Type.
To keep only records dated today, first make sure the source field is a Date value. Then add a custom column containing a comparison such as [OrderDate] = Date.From(DateTime.LocalNow()), where the existing source column is named OrderDate. The result is true for rows whose OrderDate equals the date at refresh and false for other rows. You can filter the new column to true, or write a filter step in M. If OrderDate is Date/Time instead, convert it to a date before comparing so that its time portion does not prevent a match.
For a rolling period, the same current-date value can be used as the endpoint of a date range. Be precise about whether the range includes today and whether its start is inclusive. If you need a period such as the previous seven calendar days, define the start and end dates explicitly and test records on both boundary dates; “last seven days” can otherwise mean different things to different users.
Local time, UTC, and Power Query Online
Local time depends on where the query runs. In Excel Desktop, DateTime.LocalNow() uses the computer’s local date and time. In cloud environments, including Power Query Online, local-now functions return UTC rather than the time zone of a user’s desktop. As a result, a refresh near midnight can produce different calendar dates in Desktop and an online service.
If the business definition of today is UTC, make that choice explicit with Date.From(DateTimeZone.UtcNow()). This extracts the UTC date from the current UTC date-and-time value. For repeatable evaluation within a query, the fixed counterpart is Date.From(DateTimeZone.FixedUtcNow()). UTC is often suitable for globally consistent logs, but it may not match a local team’s business day.
If the required date belongs to a particular local time zone, do not assume that a cloud refresh knows the viewer’s location. A fixed offset can be applied to a zoned time, but offsets change with daylight-saving rules in many regions. A fixed offset alone does not automatically apply the correct regional daylight-saving transition. Decide which time zone defines the reporting day and provide a reliable time-zone conversion strategy when that distinction matters.
Use a fixed value when consistency matters
Power Query also provides DateTime.FixedLocalNow(). It returns the local date and time as a fixed value for the duration of an evaluation, so repeated calls during that evaluation do not keep advancing. For a date column that should have one consistent refresh value, use Date.From(DateTime.FixedLocalNow()) rather than calling the non-fixed function independently in several steps.
Fixed does not mean permanent. On a later refresh, the function is evaluated again and can return a new date. It also does not make a query refresh automatically. The query’s refresh schedule or a user action determines when Power Query runs; the function only determines what value is read while it runs.
A useful rule of thumb is to use a fixed function when multiple parts of a query must agree on one timestamp or date. Use a UTC function when the intended reporting clock is UTC. Use the local function when the machine’s local clock is deliberately the business clock and the query runs in an environment whose time zone is understood.
Data types, display formats, and refresh behavior
Power Query’s Date type stores a calendar date without a time. After adding the column, check its type rather than relying on how the preview happens to display it. A text value that looks like a date can sort alphabetically, fail date arithmetic, or compare incorrectly with a true Date value. Use Transform > Data Type > Date when the result should be date-only.
The Power Query preview is not the same thing as a live worksheet result. The preview can be refreshed independently, and the loaded Excel table changes when its query is refreshed and loaded. In Excel, Data > Refresh All refreshes workbook connections and queries; an individual query can also be refreshed from its context menu in the Queries & Connections pane. If background refresh is enabled, allow the operation to finish before judging the loaded result.
Formatting is a separate concern from the stored type. Power Query determines whether the output is a Date or Date/Time; Excel’s cell formatting determines how a loaded date is displayed in the worksheet. If the table shows a number or an unexpected date style, verify the output type and then adjust the worksheet’s number format. Changing display formatting does not change the date calculation.
Common problems and practical fixes
- The date is one day ahead or behind: Check whether the query is running in Desktop or a cloud service and whether the required clock is local time or UTC. A refresh close to midnight can expose the difference.
- The result includes a time: Use
Date.From(...)around the date-and-time expression, then confirm the column type is Date. - The date does not change: Refresh the query. Power Query does not recalculate the loaded value continuously, and refreshing only the worksheet’s display will not refresh the query data.
- The comparison returns no matching rows: Check the source column’s type. Convert Date/Time values to Date before comparing them with a date-only value; also check for errors or text-formatted dates.
- Different steps show different times: Use a Fixed function when one consistent value is needed throughout an evaluation, especially if the query could run across a time boundary.
Also consider query folding and the data source when troubleshooting. Some transformations can be translated and run by the source database, while others run in Power Query. A current-time expression can be evaluated in a different place than expected depending on the connector and query plan. If a result is business-critical, test the actual refresh route—Desktop, gateway, or cloud—and document the chosen time zone rather than relying on a preview alone.
Power Query versus Excel’s TODAY function
Power Query is useful when the date belongs in a refreshed data transformation, such as tagging imported records with the refresh date or filtering a query to current-day data. Excel’s worksheet function is different: it recalculates according to Excel’s calculation settings and can update when the workbook recalculates. It is not a substitute for refreshing a Power Query connection.
With a formula entered in cell A1, =TODAY() returns the current date according to Excel’s date system and the computer’s clock; for a calculation on November 2, 2026, the result is November 2, 2026. A worksheet cell can therefore be handy for a visible dashboard date. If Power Query imports that cell or a table containing it, the query still needs to refresh to read the updated source value.
Choose based on where the value is used. Use M when the date is part of the query’s transformation logic or loaded output. Use TODAY in a worksheet when a formula-driven display is the goal. Do not expect a value calculated in one layer to update another layer without its normal recalculation or refresh process.
Frequently Asked Questions
What is the Power Query formula for today’s date?
Use the M expression Date.From(DateTime.LocalNow()) for the local date available to the query environment. For a UTC date, use Date.From(DateTimeZone.UtcNow()).
Does Power Query current date update automatically?
No. The expression is evaluated when the query runs. Refresh the query to get a new value; a workbook left open does not cause a Power Query result to roll over automatically at midnight.
Why does Power Query show a different date from my computer?
A cloud query may use UTC even when your computer uses another time zone. Check the execution environment and choose an explicit UTC or local-time approach that matches the reporting requirement.
How do I add today’s date to every row?
In Power Query Editor, select Add Column > Custom Column and enter Date.From(DateTime.FixedLocalNow()) for one consistent local date during that evaluation. Confirm the new column is typed as Date.
Can I use TODAY() inside Power Query?
No. TODAY() is an Excel worksheet function, not an M function. Use the M date-time functions in a query, or calculate TODAY() in a worksheet and let Power Query read that value after a refresh.
Related
- Absolute Reference in Excel Without F4: Manual Methods
- Excel Absolute References on Windows: How to Use Them
- Excel Name Box: Change a Range or Named Range
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Excel Very Slow Saving Files? Causes and FixesIf Excel is very slow saving files, first save a copy to a local folder and compare the…
- Calculate Age in Excel From Two Dates: Exact YearsTo calculate someone’s age in completed years from a birth date and a second date, enter the birth…
- Excel Keyboard Shortcuts to Know for Faster WorkThe most useful Excel keyboard shortcuts are Ctrl+C, Ctrl+V and Ctrl+Z for copying, pasting and undoing; Ctrl+Arrow keys…
- Excel Absolute References on Windows: How to Use ThemTo make an Excel reference stay on the same cell when you copy a formula, put a dollar…
- Excel Shortcut Codes: Essential Keys and How They WorkExcel shortcut codes usually means keyboard shortcuts: press a key or combination of keys to run a command…
- Excel Shortcut Desk Pad: What to Look ForAn Excel shortcut desk pad is a desk mat or reference sheet printed with keyboard shortcuts; it is…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.