YouTip LogoYouTip

Func Date Time Set

# PHP date_time_set() Function [![Image 3: PHP Date/Time](#) PHP Date/Time Reference](#) ## Example Set the time: [Run Example Β»](#) * * * ## Definition and Usage The date_time_set() function is used to set the time. ## Syntax date_time_set(_object,hour,minute,second);_ | Parameter | Description | | :--- | :--- | | _object_ | Required. Specifies a DateTime object returned by [date_create()](#). | | _hour_ | Required. Specifies the hour of the time. | | _minute_ | Required. Specifies the minute of the time. | | _second_ | Optional. Specifies the second of the time. Default is 0. | ## Technical Details | Return Value: | Returns a DateTime object on success. Returns FALSE on failure. | | :--- | | PHP Version: | 5.2+ | | Changelog: | PHP 5.3.0: The return value changed from NULL to DateTime. | * * PHP Date/Time Reference](#)
← Func Date Timestamp GetFunc Cal Juliantojd β†’