PHP Date Convert into Time

PHP Date Convert into Time


Posted in : PHP Posted on : January 22, 2011 at 6:27 PM Comments : [ 0 ]

In this tutorial you will learn how to convert PHP date into time in a PHP web application .

PHP Date Convert into Time

In this tutorial you will learn how to convert  PHP date into time in a PHP web application . In this tutorial first find current date and again date  convert into time .Next time also convert  into date . The code of  "php-convert-date-into-time.php" given below :

<?
$currentDate=date("d-m-Y H:i:s");
echo "Current Date :: ".$currentDate."<br>";
echo "convert date into time :: ";
$currentTime = strtotime($currentDate);
echo $currentTime."<br>";
echo "convert time into date :: ";
echo date("d-m-Y H:i:s",$currentTime);
?> 

Output :

When run "php-convert-date-into-time.php"  display output as :

Download Source Code

Go to Topic «PreviousHomeNext»

Your Comment:


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

 
Tutorial Topics