PHP Date Time

Recent Tutorial

PHP Time Ago Function

March 1, 2016
This PHP tutorial is for converting given date into a time ago string like 2 hours age, 3 years ago. In a previous tutorial, we have seen date format conversion by using PHP inbuilt functions. In this example, we are having a custom function to change a date format into time ago string. View Demo […]
This tutorial was added to PHP.

Calculating Hours Difference in PHP

April 15, 2015
In PHP, there are many ways to calculate the difference between two dates. In this tutorial, we are using PHP date time functions to calculate the hour¬†difference between two dates. In this example, we are start and end dates from the user. And then, we use strtotime() to convert the date string into timestamp to […]
This tutorial was added to PHP.

PHP Timestamp

August 21, 2013
PHP provides several date time functions to perform required operations with temporal data. Now, we are going to see about PHP timestamp functions. The timestamp is the value represented as seconds calculated, since UNIX Epoch, January 1, 1970, and also called as UNIX timestamp. In PHP, it includes several functions to work with a timestamp. […]
This tutorial was added to PHP.

PHP Current Date

August 16, 2013
After a little break, happy to meet PHP readers again. Now, we are going to see PHP functions that are used to get the current date. There are several PHP supported date functions in this regard, but varied based upon the arguments, return type and etc. These functions are listed as follows that will be […]
This tutorial was added to PHP.

PHP Timezone

June 27, 2013
In PHP, working with timezone is quite interesting by utilizing various functions coming under PHP date/time. In this article, we are going to cover the following list of items. How to get a list of PHP supported timezone identifiers. PHP timezone getters and setters. PHP timezone conversion. How to Get list of PHP Supported Timezone […]
This tutorial was added to PHP.

Formatting Dates in PHP

June 5, 2013
PHP contains several inbuilt functions for changing the date time format. In this tutorial, we are going to see the characters used in representing date and the PHP functions used to change date formats. There are several characters used in PHP date formatting. Let us see some of the frequently used characters as follows. Date […]
This tutorial was added to PHP.

Dates and Time in PHP

April 25, 2013
PHP includes a lot of date and time functions. These functions are coming under PHP date and time-related extensions. These are used perform various operations with date and time, like getting date time information based on the input or parameters passed, performing date time manipulation, converting date input¬†formats from one another and more. In this […]
This tutorial was added to PHP.

↑ Back to Top