|
|
Tutorials » Php »
|
Topic |
What is a strftime Function?
|
|
Explanation |
|
The "strftime()" function is used to format a locale time/date according to local settings.
Syntax:
strftime(format,timestamp)
In the above syntax the parameters for timestamp specifies the format of the output. The time stamp is an optional value, which specifies the date or time to be formatted.
Example:
<?php
echo(strftime("%b %d %Y %X", mktime(20,0,0,12,31,98))."<br />");
?>
Result:
Dec 31 1998 20:00:00
In the above example the strftime() function specifies the format starting with month, date, year and current time.
Note: (PHP 4, PHP 5)
|
|
A Note |
Learn PHP programming language tutorial with simple and neat example. Hope you enjoy this free tutorial.
Do give us your valuable feedback and suggestions on this online tutorial. This is a Copyright Content.
|
|
|
|