SQL – SQL Server CURRENT_TIMESTAMP Function
The SQL Server CURRENT_TIMESTAMP() function returns the current date and time as “YYYY-MM-DD HH-MM-SS”.
The SQL Server CURRENT_TIMESTAMP() function returns the current date and time as “YYYY-MM-DD HH-MM-SS”.
The SQL Server DATEADD() function adds a time/date interval to a date and then returns the date.
The SQL Server DATEDIFF() function returns the difference between two dates.
The SQL Server DATEFROMPARTS() function returns a date from the specified parts (year, month, and day values).
The SQL Server DATENAME() function returns a specified part of a date as a string value.
The SQL Server DATEPART() function returns a specified part of a date as an integer value.
The SQL Server DAY() function returns the day of the month (from 1 to 31) for a specified date.
The SQL Server GETDATE() function returns the current database system date and time, in a “YYYY-MM-DD hh:mm:ss.mmm” format.
The SQL Server GETUTCDATE() function returns the current database system UTC date and time, in a “YYYY-MM-DD hh:mm:ss.mmm” format.
The SQL Server ISDATE() function checks an expression and returns 1 if it is a valid date, and 0 if it is NOT a valid date.
The SQL Server MONTH() function returns the month part for a specified date (a number from 1 to 12).
The SQL Server SYSDATETIME() function returns the date and time of the computer where the SQL Server is running.
The SQL Server YEAR() function returns the year part for a specified date.