DATEPART, DATEADD and DATEDIFF Funtions in SQL.
DATEPART – used to return a part of a date/time like year, month, day, hour, minute info.
DATEADD – adds or subtracts a specified interval from a date.
DATEDIFF – calculate the difference between two date fields based on the interval provided
DATEPART IN SQL SERVER
DATEADD IN SQL SERVER
DATEDIFF IN SQL SERVER