SQL date format conversion functions are: 1. [Select CONVERT(GETDATE(), 23)] formats the current date into [year-month-day] format; 2. [Select CONVERT(GETDATE()) , 8] Format the current time into [hour: minute: second] format.
sql date format conversion functions are:
1. Format the current date into [year-month-day] format, Select CONVERT(varchar(100), GETDATE(), 23).
2. Format the current time into [hour:minute:second] format, Select CONVERT(varchar(100), GETDATE(), 8).
3 , Format the current date and time into [Year-Month-Day Hour:Minute:Second] format, Select CONVERT(varchar(100), GETDATE(), 20).
4. Format the current date into [day-month-year] format, Select CONVERT(varchar(100), GETDATE(), 105).
5 , format the current date into [year/month/day] format, Select CONVERT(varchar(100), GETDATE(), 111). Complete the rendering.
Related learning recommendations: SQL video tutorial
The above is the detailed content of What are the SQL date format conversion functions?. For more information, please follow other related articles on the PHP Chinese website!