How to use strftime in PHP

This article describe about strftime() function in PHP.
  • 1700

strftime() function

According to local setting strftime() function format the time.

Syntax

strftime(format, timestamp)

Example

<html>
<body>
<?php
echo(strftime("%b %d %Y %X", mktime(10,0,0,12,15,88))."<br />");
echo(gmstrftime("%b %d %Y %X", mktime(10,0,0,12,15,88))."<br />");
echo(gmstrftime("It is %a on %b %d, %Y, %X time zone: %Z",time()));
?>
</body>
</html>

 

Output


pic10.jpg

You may also want to read these related articles Click here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.