Recently imported data in PostgreSQL, encountering time problems, combing the time in the database:1. Basic Concepts1.1 Date: That is the commonly said year, month, and day, the following is a list of valid date formats:
Example
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
PHPdate format a local time/date. Date (PHP4, PHP5) date format a local time/date description stringdate (string $ format [, int $ timestamp]) returns the string date generated by the integer timestamp according to the given format string
(PHP 4,
Date
(PHP 4, PHP 5)
date-formatting a local time/date
DescriptionString 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 timestamp is given, the local current
Date
(PHP 4, PHP 5)
Date-format a local time/dateDescription: string date (string $ format [, int $ timestamp])
Returns the string generated by the integer timestamp according to the given format string. If no timestamp is provided, the current
1. Use {0 :?} Format
You can use the string. Format method or the console. Write method to format numeric results. The latter method calls string. format. Use a format string to specify the format. The following table contains supported standard
PHP format date usage code, including the leading zero example. PHP format date usage code, including the leading zero example: format character description return value example d the day of the month, with the leading zero number 01 to the day of
Share the Control List of PHP time formats. The format character specifies the return value. for example, the day in the month ------ d, the number of the day in the month contains the 2nd digit of the leading zero, 01 to 31j, and no leading zero, 1
format character
Description
example of return value
Day
---
---
D
The day ordinal of a month with a leading zero 2-digit number
01 to 31
J
The day ordinal of the month without
format character
Description
return Value Example
Day
---
---
D
The first day of the month with a leading zero of 2 digits
01 to 31
J
Days of the month, no leading zeros
1 to 3
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.