concept of date function and its use in php

how many arguments does date_format() have? explain in detail

  • Snehal
  • 26 Jul 2018
  • 774 Views
  • 2 Answers
Your Answer

The date() function formats a local date and time, and returns the formatted date string.
Syntax for date() function is date(format,timestamp); where format arguement is required and  specifies the format of the outputted date string. And timestamp is optional and specifies an integer Unix timestamp. Default is the current local time (time()).
The date_format() function returns a date formatted according to the specified format.
Syntax for date_format() is date_format(object,format); where object arguement is required and specifies a DateTime object returned by date_create(). And format is required and specifies the format for the date.

Php

Didn't get the answer.
Contact people of Talent-Php directly by clicking here