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

1
722

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

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here