Skip to content

Tag Archives: PHP-date-time

The getlastmod() function is used to get the time of the last modification of the main script of execution. To show the last modification time… Read More
The task is to convert DateTime to String using PHP. There are two ways to convert it.   1. By using Format method  In the… Read More
In this article, we will learn how to get time difference in minutes using PHP.  We will be using the built-in function date_diff() to get… Read More
Sometimes, we need to get the last modification time of the current page in PHP for different uses. Since we are using PHP, we can… Read More
The DateTimeImmutable::createFromMutable() function is an inbuilt function in PHP which is used to return the new DateTimeImmutable object encapsulating the given DateTime object. Syntax: DateTimeImmutable… Read More
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

Start Your Coding Journey Now!