CONVERT (Data_type,expression[,style])CONVERT (varchar (10), field name, conversion format)DescriptionThis style is typically in the time type (Datetime,smalldatetime) and the string type (Nchar,nvarchar,char,varchar)It is only used when converting
Common date functions
SQL Server time and date function detailed, SQL Server, time, date,
1. Current system date, time
Select GETDATE ()
2. DateAdd returns a new datetime value on the basis of adding a period of time to the specified date
For
Asp tutorial. net SQL server date and time format convert conversionOn the client, you can use the tostring () method for formatting:Datetime. now. tostring ("d") returns the standard date format.Datetime. now. tostring ("mm dd, yy") returns the
Asp tutorial. net SQL server Date and Time Format convert ConversionOn the client, you can use the tostring () method for formatting:
Datetime. now. tostring ("d") returns the standard date format.
Datetime. now. tostring ("mm dd, yy") returns
Convert a date format using the CONVERT function in SQL Server2008-01-23 15:47
Convert date format with convert function in SQL Server 2008-01-15 convert date format with convert function in 15:51sqlserverThe default date field for the
Convert a date format using the CONVERT function in SQL Server2008-01-23 15:47Convert date format with convert function in SQL Server 2008-01-15 convert date format with convert function in 15:51sqlserverThe default date field for the Chinese
Convert date format with convert function in SQL Server 2008-01-15 convert date format with convert function in 15:51sqlserverThe default date field for the Chinese version of SQL Server datetime format is YYYY-MM-DD Thh:mm:ss.mmmFor example:Select
First, we will see an introduction to the convert function on the official website, that is, the CONVERT () function converts a date to a common function of the new data type and CONVERT () functions can display date and time data in different
Date and Time functionsThis chapter discusses some functions that can be used to manipulate time values. See section 11.3, "Date and Time type" for valid formats for each time and date type with a range and a specified value.
The following example
When I used to solve this problem with ASP is quite simple, the ASP has the corresponding function DateDiff can give two days period interval How many months, how many days and how many seconds. When I searched through the PHP manual I found that
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.