Strftime is a common PHP in the date-time acquisition function, will be stored in the database of the number converted to a function of time, here for you to introduce the use of strftime function and parameters, the need for friends can refer to
Definitions and usageThe strftime () function formats the local time/date according to the locale setting.
GrammarStrftime (format,timestamp) parameter descriptionFormat is optional. Specify how the results are returned.Timestamp optional.Tips and
Direct call to Strftime () strftime (TIME_BUF, N, "%a,%e%b%G%T%z", p_stime); Output to??, 18 12?? 2015 11ê±19? 36?? +0800ReasonStrftime () output is output in accordance with the encoding format set by the system, and the system does not match,Two
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
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
PHP date format a local time date(PHP 4, PHP 5)date- Formatting a local time/dateDescriptionstring date ( string $format [, int $timestamp ]) Returns a string that is the result of the timestamp of an integer in a given format string. If no
The direct subtraction of functions is not correct, you need to do this:
* * Get the current date and time
In Unix, time is represented by the number of seconds that have elapsed since 0 o'clock January 1, 1970, which is called the Unix timestamp (
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.
PHP Learning Series (1)--String processing function (4), PHP function
16. The HEBREVC () function converts a right-to-left stream of Hebrew text to a left-to-right stream. It will also convert the new line (\ n) to。 Only ASCII characters between 224
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.