Tag Archives: PHP-date-time

The Task is to convert a Date to a timestamp using PHP. The task can be done by using the strtotime() function in PHP. It… Read More
The purpose of the article is to get the current Date and Time in PHP. It is performed by using a simple in-built PHP function… Read More
The Unix timestamp is designed to track time as a running total of seconds from the Unix Epoch on January 1st, 1970 at UTC. To… Read More
The strftime() function is an inbuilt function in PHP that formats local time or date according to locale settings i.e. it formats local time or… Read More
The DateTimeImmutable::setISODate() function is an inbuilt function in PHP which is used to sets the ISO (International Organization for Standardization ) date into the created… Read More
The DateTimeImmutable::setDate() function is an inbuilt function in PHP which is used to set a new date in the created DateTimeImmutable object. Syntax: DateTimeImmutable DateTimeImmutable::setDate(… Read More
The DateTimeImmutable::setTime() function is an inbuilt function in PHP which is used to sets the desired time by resetting the current time of the created… Read More
The DateTimeImmutable::setTimezone() function is an inbuilt function in PHP which is used to set the time zone for the created DateTimeImmutable object. This function returns… Read More
The DateTimeImmutable::sub() function is an inbuilt function in PHP which is used to subtract a number of days, months, years, hours, minutes and seconds from… Read More
The DateTime::setDate() function is an inbuilt function in PHP which is used to reset the current date of DateTime object with the given date-time object.… Read More
The DateTimeImmutable::add() function is an inbuilt function in PHP which is used to add a number of days, months, years, hours, minutes and seconds to… Read More
The date_create_immutable_from_format() function is an inbuilt function in PHP which is used to parse a time string according to the specified format. Syntax: Object oriented… Read More
The DateTime::createFromFormat()function is an inbuilt function in PHP which returns a new DateTime object representing the date and time format. Syntax: Object oriented style: DateTime… Read More
The DateTime::format() function is an inbuilt function in PHP which is used to return the new formatted date according to the specified format. Syntax: Object… Read More
The DateTimeImmutable::setTimestamp() function is an inbuilt function in PHP which is used to set the date and time based on an Unix timestamp. Syntax: DateTimeImmutable… Read More