PHP date query function code
Date_default_timezone_set ('prc'); // Default time zone
Echo "today:", date ("Y-m-d", time ()),"";
Echo "today:", date ("Y-m-d", strtotime ("18 Jun 2008 ")),"";
Echo
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
MYSQL gets the current date and date formatGet system Date: Now ()Formatted Date: date_format (date, format)Note: Date: Time fieldFormat: Date formatsReturns the system date, output 2009-12-25 14:38:59Select Now ();Output 09-12-25Select Date_format (
MYSQL gets the current date and date formatGet system Date: Now ()Formatted Date: date_format (date, format)Note: Date: Time fieldFormat: Date formatsReturns the system date, output 2009-12-25 14:38:59Select Now ();Output 09-12-25Select Date_format (
MYSQL gets the current date and date formatGet system Date: now ()Formatted Date: date_format (date, format)Note: Date: Time fieldFormat: Date formatsReturns the system date, output 2009-12-25 14:38:59Select Now ();Output 09-12-25Select Date_format (
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
Get a date of n days
public static Date getTime (int day) {
Calendar objcalendar=calendar.getinstance ();
Objcalendar.add (calendar.date,day);
Date objdate=objcalendar.gettime ();
System.out.print (objdate);
return objdate;
}/**
First, Java.util.Calendar Introduction
The Calendar class is an abstract class that provides methods for a specific moment to transform between a set of calendar fields such as year, MONTH, Day_of_month, HOUR, and for manipulating calendar fields,
PHP gets days of the week and dates of Monday and next Monday for this week
$today =date ("y-m-d");
echo $today;//You can get the date today. Output 2014-9-29
Define an array first.
$rows =array ("Day", "one", "two", "three", "four", "five", "
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.