- $a = getdate ();
- printf ('%s%d,%d ', $a [' month '], $a [' mday '], $a [' Year '];
- ?>
Copy Code2,getdate () using the specified timestamp
- $a = getdate (163727100);
- printf ('%s%d,%d ', $a [' month '], $a [' mday '], $a [' Year '];
- ?>
Copy Code3,getdate () gets the current date
- GETDATE () Gets the current date-bbs.it-home.org
- $date _array = getdate ();
- foreach ($date _array as $key = + $val) {
- print "$key = $val
";
- }
- ?>
-
- Print "Today ' s Date:";
- Print $date _array[' mon ']. " /". $date _array[' Mday ')." /". $date _array[' year ');
- ?>
Copy CodeAttached, the corresponding relationship of the return value of the GETDATE () function Key valueseconds secondsminutes minuteshours hoursmday Day of the Monthwday day of the week, numeric (Sunday are 0, Saturda Y is 6) Mon Month, numericyear year, numeric (4 digits) Yday Day of the year, numeric (e.g., 299) weekday Day of the week, TE Xtual, full (e.g, "Friday") month month, textual, full (e.g., "January") 0 Seconds since epoch (what time () returns) |