# Trouble with formatting frontend date

**URL:** <https://forum.ghost.org/t/trouble-with-formatting-frontend-date/49545>\
**Category:** Themes\
**Created:** [August 15, 2024, 8:57am UTC](https://forum.ghost.org/t/trouble-with-formatting-frontend-date/49545 "2024-08-15T08:57:56Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![vikaspotluri123](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/vikaspotluri123/32/24_2.png) [@vikaspotluri123](https://forum.ghost.org/u/vikaspotluri123)\
**Post date:** [August 15, 2024, 1:33pm UTC](https://forum.ghost.org/t/trouble-with-formatting-frontend-date/49545/2 "2024-08-15T13:33:42Z")

</div>

You’re formatting the metadata, not the text 😅

Try flipping it:

`<time class="gh-article-meta-date" datetime="{{updated_at}}">Updated: {{date updated_at format="D MMMM YYYY"}}`

You can also only show this text if there’s actually been an update:

> [@Only showing updated\_at if it is different from published\_at](https://forum.ghost.org/t/only-showing-updated-at-if-it-is-different-from-published-at/26887):
>
> Is there a way within the HBS files to only show the updated\_at value if it differs from published\_at? I currently use something like this. Published: \<time datetime="{{date format="YYYY-MM-DD"}}"\>{{date published\_at}}\</time\> {{#if updated\_at}} Updated: \<time datetime="{{date format="YYYY-MM-DD"}}"\>{{date updated\_at}}\</time\> {{/if}} It always displays the updated date, since updated\_at seems to always contain a value (the published\_at value), even if the post was never actually edited/updated…

---

_[View the full topic](https://forum.ghost.org/t/trouble-with-formatting-frontend-date/49545)._
