# \[PHP\] Formatting dates

**URL:** <https://forum.kirupa.com/t/php-formatting-dates/192311>\
**Category:** programming\
**Created:** [June 27, 2006, 6:37pm UTC](https://forum.kirupa.com/t/php-formatting-dates/192311 "2006-06-27T18:37:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ZephyrWest](https://avatars.discourse-cdn.com/v4/letter/z/87869e/32.png) [@ZephyrWest](https://forum.kirupa.com/u/ZephyrWest)\
**Post date:** [June 27, 2006, 6:37pm UTC](https://forum.kirupa.com/t/php-formatting-dates/192311/1 "2006-06-27T18:37:23Z")

</div>

I have a date stored in a MySQL database and its formatted YYYY-MM-DD HH:MM:SS (datetime data type). When I retrieve and display it, I want it formatted in a different way (MM/DD/YY at HH:MM). Is there a PHP function that can “reformat” a date? Or do I have to do it manually?

If manually, what would be the most efficient way?

ZephyrWest :kommie:
