Snippets tagged “strtotime”
8 snippets use this tag.
- Add 30 seconds to the time with PHPPHP
You can use the strtotime function in PHP to add a specified number of seconds to a given time.
- Convert date to day name e.g. Mon, Tue, WedPHP
In PHP, you can use the date function to convert a date to a day name.
- Difference between 2 dates in secondsPHP
In PHP, you can use the built-in function strtotime() to convert a date string to a Unix timestamp, which is the number of seconds since the Unix epoch (January 1, 1970).
- Given a Unix timestamp, how to get beginning and end of that day?PHP
You can use the strtotime() function in PHP to convert a Unix timestamp to the beginning and end of that day.
- How to add 5 minutes to current datetime on php < 5.3PHP
You can use the strtotime function in PHP to add a certain number of minutes to a date and time.
- How to Convert a Date Format in PHPPHP
On this page, we are going to help you figure out the main ways of converting date formats in PHP.
- How to make a countdown using PHPPHP
One way to make a countdown using PHP is to use the time() function, which returns the current timestamp, and subtract a future timestamp (representing the end date and time of the countdown) from it.
- PHP subtract 1 month from date formatted with date ('m-Y')PHP
You can use the DateTime object in PHP to subtract one month from a date formatted with date('m-Y').