Definition and Usage
The idate() function formats a local time or date as integer.Syntax
idate(format,timestamp)
| Parameter | Description |
|---|---|
| format |
Required. Specifies how to return the result:
|
| timestamp | Optional. Specifies the date or time to be formatted. If no timestamp is specified, it uses the current local time. |
Tips and Notes
Note: This function accepts just one character in the format parameter!Example
<?php
echo(idate("Y"));
?>
echo(idate("Y"));
?>
OUTPUT :
2006