Short answer: DAX date and time functions work on single values, like Excel's: build a date (DATE ( 2026, 10, 29 )), take it apart (YEAR, MONTH, WEEKNUM), move it (EDATE, EOMONTH), measure between two dates (DATEDIFF, NETWORKDAYS, YEARFRAC), or get the current time (TODAY, NOW). CALENDAR and CALENDARAUTO build whole date tables. For periods and comparisons, use the time intelligence functions.
These are the functions of date table columns, ages, durations, due dates and "days since last order".
Which functions build dates and tables?
| Function | Returns | Example |
|---|---|---|
| DATE | a date from year, month, day | DATE ( 2026, 10, 29 ) |
| TIME | a time from hour, minute, second | TIME ( 14, 30, 0 ) |
| DATEVALUE | a date from text | DATEVALUE ( "2026-10-29" ) |
| TIMEVALUE | a time from text | TIMEVALUE ( "14:30" ) |
| CALENDAR | a table of dates from start to end | CALENDAR ( DATE ( 2022, 1, 1 ), DATE ( 2026, 12, 31 ) ) |
| CALENDARAUTO | a table of whole years covering the model's dates | CALENDARAUTO ( 6 ) |
CALENDARAUTO ( 6 ) builds fiscal years ending in June. See the date table post.
Which functions take dates apart?
| Function | Returns | Example |
|---|---|---|
| YEAR | the year | YEAR ( 'Date'[Date] ) |
| QUARTER | 1 to 4 | QUARTER ( 'Date'[Date] ) |
| MONTH | 1 to 12 | MONTH ( 'Date'[Date] ) |
| DAY | 1 to 31 | DAY ( 'Date'[Date] ) |
| WEEKDAY | 1 to 7; return type 2 makes Monday 1 | WEEKDAY ( 'Date'[Date], 2 ) |
| WEEKNUM | week of the year; return type 21 is ISO 8601 | WEEKNUM ( 'Date'[Date], 21 ) |
| HOUR, MINUTE, SECOND | parts of a time | HOUR ( Calls[Start Time] ) |
Which functions move dates?
| Function | Returns | Example |
|---|---|---|
| EDATE | the date n months later or earlier | EDATE ( Contracts[Start], 12 ) |
| EOMONTH | the last day of the month n months away | EOMONTH ( Invoices[Date], 0 ) |
EOMONTH ( date, 0 ) is the end of the same month, EOMONTH ( date, -1 ) + 1 the first day of it.
Which functions measure between dates?
| Function | Returns | Example |
|---|---|---|
| DATEDIFF | intervals between two dates: SECOND to YEAR | DATEDIFF ( Orders[Order Date], Orders[Ship Date], DAY ) |
| YEARFRAC | the fraction of a year between two dates | YEARFRAC ( Employees[Birth Date], TODAY ( ) ) |
| NETWORKDAYS | working days between two dates, optional weekend and holidays | NETWORKDAYS ( Tickets[Opened], Tickets[Closed], 1, Holidays ) |
-- calculated column: age in whole years
Age = INT ( YEARFRAC ( Customer[Birth Date], TODAY ( ) ) )
-- measure: average days to ship
Avg Days to Ship =
AVERAGEX ( Orders, DATEDIFF ( Orders[Order Date], Orders[Ship Date], DAY ) )
-- measure: days since the customer's last order
Days Since Last Order =
DATEDIFF ( CALCULATE ( MAX ( Sales[Order Date] ) ), TODAY ( ), DAY )NETWORKDAYS takes a weekend code (1 is Saturday and Sunday) and a table of holiday dates.
Which functions return the current time?
| Function | Returns |
|---|---|
| TODAY | the current date |
| NOW | the current date and time |
| UTCTODAY | the current date in UTC |
| UTCNOW | the current date and time in UTC |
Microsoft notes that in the Power BI service the result of NOW is always in UTC, so a report in Vienna sees a time one or two hours behind; near midnight TODAY can also be a different day than the reader expects. Add the offset yourself if local time matters. In calculated columns they are evaluated at refresh, not when the report is viewed.
What goes wrong?
- Text dates. "29/10/2026" may be read as month 29 in another locale; convert in Power Query with a locale.
- WEEKNUM default. The default counts weeks from 1 January with Sunday start; use 21 for ISO weeks.
- DATEDIFF across midnight with times.
DAYcounts calendar day boundaries, not 24-hour periods. - TODAY in columns. A column with
TODAYis frozen at the last refresh.
Where can you check this?
- Microsoft Learn: Date and time functions (DAX)
- Microsoft Learn: NETWORKDAYS function (DAX)
- Microsoft Learn: WEEKNUM function (DAX)
Where do you start?
Use CALENDAR with ADDCOLUMNS for your date table and DATEDIFF for durations. Time intelligence functions take it from there.