Current location - Education and Training Encyclopedia - Resume - How to set the date format in SQL Server
How to set the date format in SQL Server
1. Open the graphic management tool of Microsoft SQL Server Management Studio, and click New Query on the top menu to open the SQL input window;

2. Format the current date as year-month-day format, and select convert (varchar (100), getdate (), 23);

3. Format the current time as hour: minute: second format, and select convert (varchar (100), getdate (), 8)';

4. Format the current date and time as year-month-day: minute: second format, and select convert (varchar (100), getdate (), 20);