date()


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

Description

date() returns a string formatted according to the given integer timestamp or the current time from the RTC if no timestamp is given. In other words, $timestamp is optional and defaults to the value of time().

※ available F/W version : all

Parameters

Return values

Returns a formatted string of current system time.

Example

<?php
$str = date("Y:M-d-TH:i:s");
echo "$str\r\n"; // OUTPUT: 2015:Mar-16-T16:27:35
while(1);
?>

See also

mktime() / time()

Remarks

This function is identical to the PHP group’s date() function. However, it supports only 16 types of arguments.