Introduction
In this article I will introduce the rest of the ‘Date and Time’ DAX functions that I didn't discuss in the previous article. I explained 11 ‘Date and Time’ functions in the previous article, the rest are as follows:
UTCTODAY
Returns the current date in datetime format expressed in coordinated universal time (UTC).
Syntax- UTCTODAY()
Return Value- Date
UTCNOW
Returns a current date and time in datetime format expressed in coordinated universal time (UTC).
Syntax- UTCNOW()
Return Value- Datetime
DATE
Returns a specified Date in datetime
Syntax- DATE(Year,Month,Day)
Return value - Date in datetime
Year
A number represents the year. It can be a 1 to 4 digit number. If the number you entered is 0-1899 then it will be added to 1900. A year with a value of greater than 9999 or less than 0 will not allowed.
Month
A number represents the month. This number will be 1 -12. If you enter greater than 12, then it will evaluate it as a month of next year. Ex –(1999,14,1) will be 1 Feb 2000.
Day
A number represent a Day. 1 – 31 are valid numbers. Numbers greater than 31 will be treated as a day of the next month. Ex- (1999, 5, 32) will be 1 June 1999.
Ex

DATEDIFF
Returns the number of units (unit specified in interval) between the input two dates.
Syntax- DATEDIFF(Date1, Date2, Interval)
Date1- A scalar datetime value
Date2- A scalar datetime
Interval- This interval can be ‘SECOND’, ‘MINUTE’, ‘HOUR’, ‘DAY’, ‘WEEK’, ‘MONTH’, ‘QUARTER’, ‘YEAR’
DATEVALUE
Converts a date in the form of text to a date in datetime format.
Syntax- DATEVALUE(DateText)
DateText- Text that represents a date.
Ex
DATEVALUE(“8/24/2020”) return 8/24/2020 12:00:00 am.
EDATE
Returns the date that is indicated number of month before or after the start date.



Join the conversation! Your thoughts help the community grow.