Get current time formatted day/month/year in php – PHP snippet

If you wish to format the current date in format day/month/year just copy the function bellow and use it where you want.

function nogettime(){
  return date('d/m/Y', time()); // this display the current time in the format day/month/year
}


If you do not wish to format the current time but a different time… just replace time() to the timestamp of that date. Here is an example of a specific date formatted date

One thought on “Get current time formatted day/month/year in php – PHP snippet

Leave a Reply

Your email address will not be published. Required fields are marked *

tutorials