One, local time and UTC timelocal timeEach region of the world has its own local time, the entire earth is divided into 24 time zones, each time zone has its own local time.UTC timeIn international radio communications, a standard time is commonly
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
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
In sqlserver2000, convert is used to obtain the processing result of the datetime data type style (full) date data format. Two examples are as follows: CONVERT (varchar (16), time 1, 20: 2007-02-0108:02 * The time is generally the * CONVERT (varchar
In sqlserver2000, convert is used to obtain the processing result of the datetime data type style (full) date data format. Two examples are as follows: CONVERT (varchar (16), time 1, 20: 2007-02-0108:02 * The time is generally the * CONVERT (varchar
How SQL SERVER 2000 obtains the current system time with SQL statementsis to use GETDATE ();
getdate in SQL () January 08, 2008 Tuesday 14:59A very powerful date format function in SQL Server
Copy Code code as follows:
Select CONVERT
Use convert in SQL server2000 to obtain the datetime data type style (full)
Processing of date data format:
CONVERT (varchar (16), time 1, 20) Result:/* The time is generally the getdate () function or the field in the data table */
Result of
Use convert in Sql server2000 to get datetime data type style (full)
Date data format processing, two examples:
CONVERT (varchar (16), time one, 20) Result: 2007-02-01 08:02/* time is generally getdate () function or field in Datasheet * *
The time format normally deposited in the database is yyyy-mm-ddhh:mm:ss if you want to convert to yyyy-mm-dd Short date format. You can use the CONVERT function. The following is a declaration of the CONVERT function in SQL Server Help:Using
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.