Definition :
In php idate() Function is inbuilt function.PHP idate() function is used to format a local time/date as an integer. It accepts two parameters $format and $timestamp. It returns an integer formatted according to the specified format using the given timestamp.
idate(format, timestamp)
Parameter | Description |
---|---|
format | Required. Specifies how to return the result. One of the following characters is allowed:
|
timestamp | Optional. Specifies a Unix timestamp that represents the date and/or time to be formatted. Default is the current local time (time()) |
Given below example Format a local time/date as integer. Test all the different formats:
Output :