Get System Current DateTime: Sysdate () Gets the system current date: Curdate () Gets the system current time: Curtime () Gets the year of the given date: yearly (date) Gets the month of the given date: month (date) A function that adds a time
First, mathematical functionsMathematical functions are mainly used for processing numbers, including integers, floating-point numbers, and so on.ABS (x)Returns the absolute value of XSELECT ABS (-1)--return 1Ceil (x), CEILING (x)Returns the
Sybase Date functionDate functionGETDATE ()Get the current time, can be set to get a variety of time formats.DATEPART (date part, date)Take a certain part of the specified time, month and day seconds.DateDiff (date part, date 1, date 2)Calculates
Reference:http://www.cnblogs.com/coconut_zhang/archive/2009/02/02/1382598.htmlHttp://blog.itpub.net/14766526/viewspace-1156100/Select GETDATE () as ' current date ',Datename (Year,getdate ()) as ' year ',Datename (Month,getdate ()) as ' month
1. Get the current timeSELECT GETDATE () as ' current date ', Datename (year, GETDATE ()) as ' Years ', datename (month, GETDATE ()) as ' month ', Datename (Day, GETDATE ()) as ' Days ', Datename (DW, GETDATE ()) as ' Week ', Datename (week,
(1) Date function1, year--take the year out2, DateAdd (Day5 '1999-02-27')--in the date basically added 5 days no one AH and then output3, datedif--How many days do two dates differ4, weekday--string form, the day of the week in one weeks5, week--int
String functions, mathematical functions, date functions, logical operation functions, and other functions
String functions, mathematical functions, date functions, logical operation functions, and other functions
Single-record functions in SQL
1
The following constants are defined in PHP 5.1.1 to provide standard Expression Methods for date formats (such as date ()).
DATE_ATOM (string)
Atomic Clock format (for example, 2005-08-15T15: 52: 01 + 00: 00)
DATE_COOKIE (string)
HTTP cookie format (
The following constants are defined in PHP 5.1.1 to provide standard Expression Methods for date formats (such as date ()).
DATE_ATOM (string)
Atomic Clock format (for example, 2005-08-15T15: 52: 01 + 00: 00)
DATE_COOKIE (string)
HTTP cookie
1. yyyy-mm-ddhh24: mi: ssYYMMDDHH24: MI: SS: y indicates the last digit of the year yy indicates the last two digits of the year yyy indicates the last three digits of the year yyyy indicates the year with four digits; mm indicates the month with
There are several areas in this project that need to be entered recently. Since there is no validity verification for these areas at the beginning, there are many invalid dates in the result user input date, such as 2007-2-29, there are also error
All functions in PHP are in the Unix era, starting January 1, 1970.
The date is the number of seconds from this time onwards.
When a function call is counted as the number of seconds from this time, it is treated as a (timestamp) timestamp.
local
PHP 5.1.1 defines the following constants to provide a standard date expression method, which can be used for date format functions such as Date ().
Date_atom (String)
Atomic clock format (eg: 2005-08-15t15:52:01+00:00)
Date_cookie (String)
HTTP
echo Date (' y-m-d h:i:s ', Time ()); Output is: 2013-03-14 12:15:27
echo gmdate (' y-m-d h:i:s ', Time ()); Output is: 2013-03-14 04:15:27
Copy CodeThe above is the result of running PHP under Linux+apache.Running under Windows, the 2
Add date_default_timezone_set (PRC) to the front of the page ); /* Change the time to Beijing time. The default PhP5 time is Greenwich Mean Time. */ Date () : "Am" or "PM" A : "Am" or "PM" D : Day (s), double-digit characters. If not, zeros are
Array class
Indexof (Object O): Number
Whether the object is in the array. If-1 is not found, the returned position is found.
Remove (Object O): Array
Deletes the specified object from the array. If the object cannot be found, the array does not
Date--Format a local time/dateDescriptionStringDate(String format [, int timestamp])Returns the integerTimestampString generated based on the given format string. If no timestamp is provided, the current local time is used. In other
PHP users may have encountered this situation. Date ("Y-m-d h: I: s") Total server time differences
Hours. I checked it online to find out. Originally, from php5.1.0, the date. timezone option was added to PhP. ini.
Is disabled by default, that is,
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.