Tagged: strtotime

0

PHP DateTime Class and Functions

With PHP 5 they introduced the DateTime class.  Prior to that everyone used strtotime, date, etc…commands to achieve the same results.  I was a late adopter and continued to use the old commands.  Recently...

0

PHP Date Formatting

A simple example of how to take a date and change it’s format using PHP. August, 3 2015 to YYYY-MM-DD Easily done with the below code: $old_date = ‘August 3, 2015’; $new_date = date(‘Y-m-d’,...

0

Changing Date Format Before Insert

When passing dates from a form to be saved in your database you sometimes need to change their format. For example a with a datetimepicker you want the format to look like 07-31-2017 12:30pm...