Extract a calendar date from a datetime value in DAX

How to strip the time from a datetime in DAX, the difference between changing the value and changing its display, and when a text date is the better choice.

Getting just the calendar date out of a datetime column is a common DAX task. The usual reasons are to join transactions to a date table, to group events by day, or to show a clean date label. Several approaches produce output that looks the same, but they do different things underneath. This review explains what each one changes and when each is the right fit.

Short recommendation

For modeling work, use a calculation that returns a real date value set to midnight. Examples are DATE(YEAR(...), MONTH(...), DAY(...)) or truncating the underlying number. The main benefit is that the result still behaves like a date. It sorts in chronological order, can serve as a relationship key to a date table, and works with time intelligence functions. The key tradeoff is that the time portion is gone from that column. Keep the original datetime if you will ever need hours or minutes.

A text date from FORMAT is the better choice only when the result is meant purely for display or export. That covers a label in a card, a concatenated title, or a fixed layout for a downstream file. Once a value becomes text, DAX no longer treats it as a date.

What the main approaches actually change

First, a note on terms. This topic sits under text extraction, but nothing here reverses, mirrors or restyles characters. The question is narrower. Does an approach change the stored value, change its data type to text, or only change how the value is displayed?

Approach | What changes | Result type | Typical use
DATE(YEAR(x), MONTH(x), DAY(x)) | Stored value: time set to midnight | Date/datetime | Relationships, grouping, time intelligence
INT(x) or TRUNC(x), then set the column type to Date | Stored value: fractional day (the time) removed | Number until the type is set to Date | Compact alternative to DATE(...)
FORMAT(x, "yyyy-mm-dd") | Converts the value to text | Text | Labels, titles, export strings
Format string on the column or measure (e.g. a short date format) | Display only: the time is still stored | Datetime | Hiding the time visually without changing behavior

Returning a true date

DAX stores datetimes as a number. The whole part counts days and the fractional part holds the time of day. You can rebuild the date from its year, month and day parts, or drop the fractional part. Either way the result represents the same calendar day at 00:00:00.

Order Date =
DATE (
    YEAR ( Sales[OrderDateTime] ),
    MONTH ( Sales[OrderDateTime] ),
    DAY ( Sales[OrderDateTime] )
)

Illustrative example: an input of 2024-03-15 14:30:00 becomes 2024-03-15 00:00:00. Set the column's data type to Date if you want the model and visuals to treat it as date-only.

Order Date (truncated) =
INT ( Sales[OrderDateTime] )
-- then set this column's data type to Date

Returning text

Order Date Label =
FORMAT ( Sales[OrderDateTime], "yyyy-mm-dd" )

The output reads as a date, but it is a string. An ISO-style pattern such as yyyy-mm-dd sorts correctly as text. A pattern like mm/dd/yyyy sorts by month first, so years end up mixed together. A text column also cannot act as a date key, and it will not respond to date hierarchies or time intelligence.

Changing only the display

A date-only format string hides the time but keeps it in the data. This is the most common cause of a confusing failure. The column looks like dates, yet it fails to match a date table, because a row at 2024-03-15 14:30 is not equal to the date-table key 2024-03-15 00:00. If relationships or day-level grouping matter, change the value, not just the format.

Pitfalls to check

  • Blanks: a blank datetime used in arithmetic or date-part functions can produce a placeholder early date instead of a blank. Guard explicitly, for example IF(ISBLANK(x), BLANK(), DATE(...)), and check the result in your own model.
  • DATEVALUE on a datetime: DATEVALUE expects text, so passing it a datetime relies on implicit conversion that can depend on locale. Prefer DATE or INT.
  • Time zones: DAX does not adjust time zones when extracting a date. A UTC timestamp late in the evening may belong to the next calendar day in UTC but the same day locally, or the reverse. Convert before you extract if the business day is defined locally.
  • Calculated column vs measure: a calculated column stores one date per row and can be used in relationships. A measure computes the date at query time and cannot be a relationship key.
  • Upstream option: if you never need the time, removing it in the source query or Power Query before load keeps the model smaller and simpler than handling it in DAX.

Will the result stay usable after copying or sharing?

A true date column keeps its meaning inside the model no matter how it is formatted. When data is copied out of a visual or exported, what you get depends on the export path and the destination application. That can be the displayed format or the underlying value. The supplied evidence does not document this for any specific tool, so test the export path you actually use.

Locale is the main readability risk for shared output. In the US, 03/04/2024 is usually read as March 4. Many other regions read it as 3 April. If a text date will cross regions or go to other systems, an unambiguous ISO pattern (yyyy-mm-dd) is the safer plain-text form. If the destination needs to do date math, share the real date value instead of text.

Gap: no evidence was supplied on how specific screen readers announce date versus text values in reports. Accessibility claims about particular assistive technologies should be confirmed with a scoped test in the target environment.

Which approach fits your use

  • Joining to a date table, grouping by day, time intelligence: return a true date with DATE(...) or INT(...) and set the type to Date.
  • Only hiding the time in a visual while keeping it available: apply a date format string and leave the value unchanged.
  • Building a label, title or export string: use FORMAT with an unambiguous pattern, and keep a real date column for anything analytical.
  • Never needing the time at all: remove it upstream before load.