Date and Time functions in PHP

Creating Your Own Timestamps

creating-your-own-timestamps The time() Function is useful for getting the current time but if you want to work with other dates and times. You can use various PHP functions to create timestamps for storing dates and times. There are three different types of Time Function: • mktime() • gmmktime() • strtotime()

Extracting Date and Time Values from a Timestamps In PHP

Now you know how to create timestamps from time/date values and strings. You can also go the other way, and convert a timestamp to its corresponding date and time components. getdate() accepts a timestamp and returns an associative array of date/time values corresponding to the supplied timestamp. The array contains the following keys: Array Key …

Extracting Date and Time Values from a Timestamps In PHP Read More »