Practice Exam

Question 63 of 75

Choose the Correct Date Function

You work for MDFT Pro, a well-known training agency. You have a Fabric warehouse that contains a table named Enrollments with the following columns:

NameData typeNullable
CourseIDIntegerNo
StudentIDIntegerNo
EnrollmentDateDateNo

You need to write a T-SQL query that will return the following columns:

You have the following T-SQL query:

SELECT 
    CourseID,
    StudentID, 
    _______ (month, EnrollmentDate) AS PeriodDate
FROM Enrollments

How should you complete the query?

Choose the correct answer from the options below.

Explanations for each answer:

Learn more about the T-SQL DATETRUNC function:
DATETRUNC Function
Next Question
Discuss this question on social media: