-2

I have a time stamp like this code below.

$time=time();

Please Explain how can i make a custom date from this.

  • 1
    [date — Format a local time/date](http://php.net/manual/en/function.date.php) –  Mar 16 '17 at 20:36

2 Answers2

1

See the documentation here: http://php.net/manual/en/function.date.php

string date ( string $format [, int $timestamp = time() ] )

As an example:

echo date('Y-m-d', $time);
dave
  • 57,127
  • 4
  • 69
  • 87
0

Please use php builtin date function like this.

$time=time();
$custom_date=date('Y-m-d',$time);
echo $custom_date;

i hope you understand.

Fahad Bhuyian
  • 190
  • 1
  • 9