DAY(), MONTH() and YEAR(): They share the syntax of function (date). They can be used for obtaining the day, month, and year part of the date as integers respectively. For example, DAY(#24-05-2019#)returns 24.
DATEPART:It follows the syntax: DATEPART(date_part,date,[start_of_week]). If the start of the week is not mentioned, then it is determined based on the start day defined in the data source. For example, DATEPART(week,#24-05-2019#)returns 21.
DATENAME:The syntax remains the same as DATENAME as DATEPART(date_part,date,[start_of_week]). It is very similar to DATEPART. The key difference is that it will return the values as a string. For example, DATENAME("month",#24-05-2019#)returns May.
DATETRUNC: The syntax ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.