| Define 13 most useful Date functions in SQL?
Below are the 13 most important Date functions in SQL
(1)CURRENT_TIMESTAMP:-This will returns the current date and time.
(2)DATEADD:-This will Adds a time or date interval to a date and then returns the date result.
(3)DATEDIFF:-This will return the difference between two dates
(4)DATEFROMPARTS:-This will returns a date from the specified parts (year, month, and day values)
(5)DATENAME:-This will returns a specified part of a date as string.
(6)DATEPART:-This will returns a specified part of a date as integer.
(7)DAY:-This will returns the day of the month for a specified date given.
(8)GETDATE:-This will returns the current database system date and time.
(9)GETUTCDATE:-This will returns the current database system UTC date and time
(10)ISDATE:-We use this function to checks an expression and returns 1 if it is a valid date, otherwise 0
(11)MONTH:-This will returns the month part for a specified date (a number from 1 to 12)
(12)SYSDATETIME:-This will returns the date and time of the SQL Server.
(13)YEAR:-This will returns the year part for a specified date | | |