Convert one date format into another in PHP
Sat Jan 04 2020 18:42:11 GMT+0000 (UTC)
Saved by @Catsndogs #php #webdev #howto
You are first giving it the format $dateString is in. Then you are telling it the format you want $newDateString to be in. This also avoids the use of strtotime, which can be hard to work with at times.
https://stackoverflow.com/questions/2167916/convert-one-date-format-into-another-in-php
Comments