Table of Contents

date()

Full information can be found in the PHP Manual

syntax

string date ( string $format [, int $timestamp = time() ] )

$format

This parameter determines what is returned by the functon. For example…

  • date('Y-m-d H:i:s') ⇒ 2013-06-19 09:32:07
  • date('jS M y') ⇒ 19th Jun 13
  • date('Y') ⇒ 2013
  • date('F') ⇒ June

$timestamp

The optional $timestamp parameter is an integer Unix timestamp that defaults to the current local time if a timestamp is not given. In other words, it defaults to the value of time().

date.txt · Last modified: 2013/06/19 16:46 by bgfdsuperadmin
Recent changes RSS feed CC Attribution-Share Alike 3.0 Unported Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki