Search results
25 sie 2017 · The DATENAME() function returns a specified part of a date. This function returns the result as a string value. Syntax
SELECT DATENAME( dw, DATEFROMPARTS( @Year, @Month, @Day ) ) If your date parts are strings, then you can use the CONCAT function. SELECT DATENAME( dw, CONVERT( date, CONCAT( @Day, '/' , @Month, '/', @Year ), 103 ) )
17 maj 2021 · Learn SQL Server date and time functions SYSDATETIME, SYSDATETIMEOFFSET, SYSUTCDATETIME, CURRENT_TIMESTAMP, GETDATE (), DATENAME, DATEPART with examples.
5 mar 2020 · SELECT DATENAME(YY, BirthDate) as year, DATENAME(MM, BirthDate) as month, DATENAME(dd, BirthDate) as day FROM HumanResources.Employee DATENAME Example with Different Units The following example shows the datename using different units.
19 mar 2024 · The GETDATE() function in SQL Server is used to obtain the current date and time of the database server's system. This function does not require arguments and returns a value of the datetime type, representing the current date and time in the 'YYYY-MM-DD hh:mm:ss.sss' format.
17 paź 2011 · SQL Server offers two functions that help you with retrieving parts of a date: DATEPART and DATENAME. Both functions require two parameters: the unit of time and date to be queried against.
Learn how to use the SQL Server DATENAME() function to get a character string that represents a specified date part of a date.