# Change Date

**URL:** <https://www.phphelp.com/t/change-date/35790>\
**Category:** Uncategorized\
**Created:** [October 30, 2023, 6:57pm UTC](https://www.phphelp.com/t/change-date/35790 "2023-10-30T18:57:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![webchambers](https://www.phphelp.com/letter_avatar_proxy/v4/letter/w/ed655f/32.png) [@webchambers](https://www.phphelp.com/u/webchambers)\
**Post date:** [October 30, 2023, 6:57pm UTC](https://www.phphelp.com/t/change-date/35790/1 "2023-10-30T18:57:41Z")

</div>

I currently have this code which shows 2023-10-29 18:42:53

```auto
echo "".$user_data['createdate']."";

```

how do i change it to Monday 30th October 18:42

Thanks

---

<div class="post-metadata">

**Author:** ![Strider64](https://www.phphelp.com/user_avatar/www.phphelp.com/strider64/32/3161_2.png) [@Strider64](https://www.phphelp.com/u/Strider64)\
**Post date:** [October 30, 2023, 11:47pm UTC](https://www.phphelp.com/t/change-date/35790/2 "2023-10-30T23:47:43Z")

</div>

> [@webchambers](#):
>
> I currently have this code which shows 2023-10-29 18:42:53
> 
> ```auto
> echo "".$user_data['createdate']."";
> 
> ```
> 
> how do i change it to Monday 30th October 18:42

```auto
$date = new DateTime($user_data['createdate']);
echo $date->format('l jS F H:i');

```

More in depth info can be found here - [https://www.php.net/manual/en/book.datetime.php](https://www.php.net/manual/en/book.datetime.php)

---

<div class="post-metadata">

**Author:** ![webchambers](https://www.phphelp.com/letter_avatar_proxy/v4/letter/w/ed655f/32.png) [@webchambers](https://www.phphelp.com/u/webchambers)\
**Post date:** [October 31, 2023, 11:19am UTC](https://www.phphelp.com/t/change-date/35790/3 "2023-10-31T11:19:47Z")

</div>

Thank you so much for the input tried a few options but this is great.
