It mainly describes the actual operation process of SQLServer to use convert to obtain datetime date data. In actual operation, converdatabase uses convert to obtain datetime date data. The following examples include conversions of various date
Copy http://www.cnblogs.com/benwu/p/3939044.htmlThe main description is that SQL Server uses convert to obtain datetime date data in the actual operation process, in the actual operation with the SQL Server database using convert to get datetime
The main description is that SQL Server uses convert to obtain datetime date data in the actual operation process, in the actual operation with the SQL Server database using convert to get datetime date data, the following instance contains a
Processing of date data format:
Result of convert (varchar (16), time 1, 20): 2007-02-01 08: 02
Result of convert (varchar (10), time 1, 23): 2007-02-01
Statement and query result:Select convert (varchar (100), getdate (), 0): 05 16 2006
Use convert in SQL server2000 to get the datetime data type style (full)Processing of date data formats, two examples:CONVERT (varchar (16), time one, 20) results: 2007-02-01 08:02/* time is generally a field in the GETDATE () function or data table
CONVERT (varchar (10), field name, conversion format)CONVERT (nvarchar), count_time,121Convert is a date conversion function, typically in the time type (Datetime,smalldatetime) and the string type (Nchar,nvarchar,char,varchar)The 3 parameters of
Processing of date data formats, two examples:CONVERT (varchar (16), time one, 20) results: 2007-02-01 08:02/* time is generally a field in the GETDATE () function or data table */CONVERT (varchar (10), time one, 23) Result: 2007-02-01/*varchar (10)
According to the rules of variability, only interfaces and delegates can mark variability. You can take advantage of variability only if the type parameter is a reference type.Invariance: The parameters of a generic type cannot be changed, which
This style is generally used only when the time type (datetime, smalldatetime) and string type (nchar, nvarchar, char, varchar) are converted to each other.
This style is generally used only when the time type (datetime, smalldatetime) and string
format:
CONVERT (Data_type,expression[,style])
Description:This style is generally in the type of time (datetime,smalldatetime) and String type (Nchar,nvarchar,char,varchar)
When they are converted to each other.
Example:SELECT CONVERT (varchar)
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.