# How to format date variable

**URL:** <https://www.phphelp.com/t/how-to-format-date-variable/36594>\
**Category:** Beginners - Learning PHP\
**Created:** [September 30, 2025, 7:27pm UTC](https://www.phphelp.com/t/how-to-format-date-variable/36594 "2025-09-30T19:27:58Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![phdr](https://www.phphelp.com/letter_avatar_proxy/v4/letter/p/91b2a8/32.png) [@phdr](https://www.phphelp.com/u/phdr)\
**Post date:** [September 30, 2025, 7:38pm UTC](https://www.phphelp.com/t/how-to-format-date-variable/36594/2 "2025-09-30T19:38:34Z")

</div>

> [@babystarman](#):
>
> (some of the above is coming out in a bold font by the way)

To post code on the forum, either put bbcode `[code][/code]` tags or markdown three back-ticks ``` on their own lines, above and below your code. I have edited your post above.

Your posted code works for me and outputs an expected - 10-05-2025: some title

---

_[View the full topic](https://www.phphelp.com/t/how-to-format-date-variable/36594)._
