Answers for "php echo datetime"

PHP
0

only date in php

date('Y:m:d', strtotime($date))
Posted by: Guest on July-03-2020
6

php format date

<?php
  // To change the format of an existing date
  $old_date_format = "20/03/1999";
  $new_data_format = date("Y-m-d H:i:s", strtotime($old_date_format));
Posted by: Guest on April-14-2020
0

print date in php

// Change the line below to your timezone!
date_default_timezone_set('Australia/Melbourne');
$date = date('m/d/Y h:i:s a', time());
Posted by: Guest on September-25-2021
2

date to string php

$date_string_prepared = date_create("2020-08-07");
$date_string = $date_string_prepared->format("d M Y");
// result 07 Jul 2020
Posted by: Guest on August-29-2020

Browse Popular Code Answers by Language