MySQL Date TypeMySQL Date Type: Date format, occupied storage space, date range comparison.Date type storage space Date format date range------------ --------- --------------------- -----------------------------------------DateTime 8 bytes
Local Test Cases:
# there can be no spaces on either side of the equal sign, before the error has been out here
yesterday= ' date-d last-day +%y-%m-%d '
echo $yesterday
curday= ' Date +%y-%m-%d '
echo $curday
echo "Now time: ' Date ' +%y%m%d%T '"
Use the function date () to implement the displayed in the format: year-month-day hours: minutes: secRelated Time parameters:A-"AM" or "PM"A-"AM" or "PM"D-A few days, two digits, if less than two digits before the 0; such as: "01" to "31"D-Days of
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
During website development, we often need to process the date and time. in PHP, many date and time functions are provided to facilitate PHP developers to calculate and convert the date and time formats. Therefore, it is necessary to master the PHP
This example describes how to convert the date format of the PHP date function. During website development, we often need to process the date and time. in PHP, many date and time functions are provided to facilitate PHP developers to calculate and
So far, PHP date function date formatting characters and descriptions of some PHPUnix timestamp functions as well as conversion and formatting of each other's output instances have been completed, this is essential for understanding the calculation
This article contains the following elements:
1, get the current date and time-how many ways do we have?
2, change the date display mode-date and time display form
3, the conversion of the current date is a Unix timestamp value
4. Change Date
A.
During website development, we often need to process the date and time. In PHP, many date and time functions are provided to facilitate PHP developers to calculate and convert the date and time formats. Therefore, it is necessary to master the PHP
1. Using the DATE-D optionDate + "%y%m%d"-D "+n days" today's post N day datesDate + "%y%m%d"-D "-N days" today's top N Day dates2. Common date formatPython
[[email protected] tmp] # date + "%F"
--
[[email protected] tmp] # date + "%d"
///
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.