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 previous tutorial we have seen date format conversion by using PHP in-built functions. In this example we are having a custom function to change a date format into time ago string. View Demo HTML […]
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 datetime functions to calculate the hours 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. 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 timestamp. In this […]
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 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 discussed […]
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 list of PHP supported timezone identifiers. PHP timezone getters and setters. PHP timezone conversion. How to Get list of PHP Supported […]
This tutorial was added to PHP.

Formatting Dates in PHP

June 5, 2013
PHP contains several in-built functions for changing the datetime format. In this tutorial, we are going to see about 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
It would be very easy and also interesting to work with date and time related functions, since PHP has very useful functions in this regard. Using these functions we can have the required details both for current date or for some specified date which will be sent as arguments to these function. So, the PHP […]
This tutorial was added to PHP.

↑ Back to Top