present, which is the Unix time stamp for the Unix time era.
echo Date (' C ');
2007-02-06t14:24:43+00:00
Lowercase C represents the ISO8601 date, the date format is YYYY-MM-DD, the date
This article is intended for those who are new to DB2 and want to understand how to operate the date and time. Most people who have used other databases will find how simple the date and time of basic DB2 operations are. The following is a detailed description of the main content of the article. I hope you will have a
This article is to share the content of PHP in the date () and time () function of the application, the need for friends can refer to
1, the current timestamp (unit: seconds)
Description: The time () function returns the number of seconds of the current period from the Unix era (January 1 1970 00:00:00 GMT)Syntax: Time
after the Time difference from the Greenwich Mean Time (GMT ).
Example
The code is as follows:
Echo date ("M d y h: I: s", mktime ));Echo gmdate ("M d y h: I: s", mktime ));?>
If the machine running this example is in Finland (Finland, GMT + 0200), the returned result is:Jan 01 00:00:00 1998Dec 31 1997 22:00:00Refer to dat
the Time after the Time difference from the Greenwich Mean Time (GMT ).
Example
The code is as follows:
Echo date ("M d y h: I: s", mktime ));Echo gmdate ("M d y h: I: s", mktime ));?>
If the machine running this example is in Finland (Finland, GMT + 0200), the returned result is:Jan 01 00:00:00 1998Dec 31 1997 2
Date ("y-m-d", strtotime ("+1 Month"))
PHP gets ten years later date
Date ("y-m-d", strtotime ("+10 Year"))
PHP get today start and end timestamp
Mktime (0,0,0,date (' m '),
System Time zone settings
During the learning process, it was found that the time obtained through the date () function is different from the local time, because PHP5 has rewritten the date () function, so the current datetime function is 8 hours less than the syst
specified format
Method 1: Use localtime () to convert it to a time array and format it as needed, for example:
The Code is as follows:
Time stamp = 1381419600TimeArray = time. localtime (timeStamp)OtherStyleTime = time. strftime ("% Y-% m-% d % H: % M: % S", timeArray)Oth
gmdate ("M d y h: I: s", mktime ));?>
If the machine running this example is in Finland (Finland, GMT + 0200), the returned result is:Jan 01 00:00:00 1998Dec 31 1997 22:00:00Refer to date () mktime () gmmktime ()Easter_date is used to calculate the Easter date.Syntax: int easter_date (int [year]);Return Value: integerFunction Type: time and dateDescription: if a year is input, the Easter
Time
Returns the current UNIX timestamp
System Time zone settingsDuring the learning process, it was found that the time obtained through the date () function is different from the local time, because PHP5 has rewritten the
1.UNIX time StampPHPD processing of data, especially when the time type data in the database is formatted, it is necessary to convert the time type data into the UNIX timestamp processing. Data for time types in different database systems
cannot be compatible with transformations, then you need to turn
The database tutorial design must note that the Time field is int (11) so that the database is stored in a digital date-time stamp, we can use the Mktime function to find the current date of the timestamp to add and subtract on OK, see the example below
One month
Copy
I. Date and time:A) This is a very important piece of content, we are in Windows, or in the future to contact the timer, we need to use this piece of content!Ii. date and time in PHP:A) Timestamp: time () can get timestampI. Time stamp
date to convert time stamp to system time with specified timestamp(1) Print the timestamp for tomorrow at this time Strtotime ("+1 Day")Current Time: Echo Date ("Y-m-d h:i:s,"
/%s/%-d/%-m/%-y '
2, Set month day is 20090807, time is 00:00
Date-s 20090807
3, set time, do not change the date
Date-s 16:02:23
4, set the date and time
The demand for this example, which is to be told Today, is this. Knowing a certain date and time,
such as: 2012-04-25 10:10:00
I'm going to add 5 months on the basis of this date time and return the processed date.
Results: 2012-04-25 10:10:00 plus 5 months equals 2012-09
PHP temporal function time (), date (), mktime () Differences Browse: 1161 Release Date: 2014/12/18 Category: System code keyword: PHP time function timing () date () mktime () php temporal function time (),
time stamp parameter.
Timestamp_format returns a time stamp from a string that has been interpreted with a character template.
Timestampdiff The estimated slack represented by the type defined by the first parameter, based on the time difference between two timestamps.
T
Detailed explanation of Date and Time Processing in Python, and detailed explanation of python
In Python, there are three processing libraries for time and date: time, datetime, and Calendar. datetime has three classes: datetime. date
DB2 time and date function 1. To use SQL to obtain the current date, time, and time stamp, see the appropriate DB2 register: www.2cto.com SELECT current date FROM sysibm. sysdummy1SELEC
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.