Search code examples
sqlsql-serversql-server-2008database-administration

Date format dd/mm in SQL Server


I use SQL Server and I need to display a datetime data type in the following format:

dd/mm

day-month without the year, which is the most effective way?


Solution

  • Use 103 style in convert function and remove the year

    SELECT LEFT(CONVERT(VARCHAR(15), Getdate(), 103), 5) --11/03