In PHP, there are several functions to get time and date, in addition to the time () function to get the current UNIX timestamp and using the DATE function to get the current time, you can also call the GETDATE () function to determine the current
When GETDATE () is invoked in a custom function in a SQL 2000 database, the result compiles the times incorrectly, prompting errors as follows: Invalid use of ' getdate ' within a function
I'll give you a test example as shown below,
--===========
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
? In sqlserver, convert is used to obtain the processing of datetime data format (full). Two examples are as follows: CONVERT (varchar (16), time 1, 20) Result: 2007-02-0108:02 * The time is generally the * CONVERT (varchar (10), time 1, 23) Result
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
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
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 * *
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 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
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.