# Posted date on pages showing January 1, 0001

**URL:** <https://discourse.gohugo.io/t/posted-date-on-pages-showing-january-1-0001/41813>\
**Category:** support\
**Created:** [December 8, 2022, 10:32am UTC](https://discourse.gohugo.io/t/posted-date-on-pages-showing-january-1-0001/41813 "2022-12-08T10:32:14Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![gerbreown](https://avatars.discourse-cdn.com/v4/letter/g/8c91f0/32.png) [@gerbreown](https://discourse.gohugo.io/u/gerbreown)\
**Post date:** [December 8, 2022, 10:32am UTC](https://discourse.gohugo.io/t/posted-date-on-pages-showing-january-1-0001/41813/1 "2022-12-08T10:32:14Z")

</div>

I have seen some issues about this problem dated in 2019 for version 55. It is now December 2022 and I am using hugo v0.104.2 which is giving me the same error now so whenever it was fixed back in 2019 it has come back in 2022.

Has it been corrected again and if so how do I apply it to my code?

Thanks

---

<div class="post-metadata">

**Author:** ![chrillek](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/chrillek/32/19797_2.png) [@chrillek](https://discourse.gohugo.io/u/chrillek)\
**Post date:** [December 8, 2022, 11:54am UTC](https://discourse.gohugo.io/t/posted-date-on-pages-showing-january-1-0001/41813/2 "2022-12-08T11:54:56Z")

</div>

You’d increase your chances of getting an answer if you provided the relevant code. Links to GitHub repositories are what most people are asking for here.

---

<div class="post-metadata">

**Author:** ![nternetinspired](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/nternetinspired/32/19706_2.png) [@nternetinspired](https://discourse.gohugo.io/u/nternetinspired)\
**Post date:** [December 8, 2022, 12:36pm UTC](https://discourse.gohugo.io/t/posted-date-on-pages-showing-january-1-0001/41813/3 "2022-12-08T12:36:11Z")

</div>

The date format in your page is invalid or missing I imagine.

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [December 8, 2022, 6:42pm UTC](https://discourse.gohugo.io/t/posted-date-on-pages-showing-january-1-0001/41813/4 "2022-12-08T18:42:43Z")

</div>

There are three reasons this could happen:

1. Front matter doesn’t contain a `date` value

2. Front matter `date` is a string _and_ its format is invalid (as noted by @nternetinspired)

3. In your template you’ve done this:

---

<div class="post-metadata">

**Author:** ![gerbreown](https://avatars.discourse-cdn.com/v4/letter/g/8c91f0/32.png) [@gerbreown](https://discourse.gohugo.io/u/gerbreown)\
**Post date:** [December 9, 2022, 10:32am UTC](https://discourse.gohugo.io/t/posted-date-on-pages-showing-january-1-0001/41813/5 "2022-12-09T10:32:10Z")

</div>

What is the valid format?  
In my config.yaml I have “dateFormat: Mon Jan 2 2006” without the quotes and in my \*.md file I have date: 2021-03-09 in the front matter.

When I view the file it shows “Posted January 1, 0001”

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [December 9, 2022, 5:30pm UTC](https://discourse.gohugo.io/t/posted-date-on-pages-showing-january-1-0001/41813/6 "2022-12-09T17:30:18Z")

</div>

You are more likely to receive a prompt and accurate response if you post a link to the public repository for your project.

See [https://discourse.gohugo.io/t/requesting-help/9132](https://discourse.gohugo.io/t/requesting-help/9132).

> Let us see your code
> 
> Include a **link to the source code repository** of your project, because we really need the _context_ of seeing your templates and partials to be able to help you. It is trivial to do a quick `git clone` on your repo, then run `hugo server` in your project, to help you out. On the other hand, recreating your code from screenshots, or sort of guessing at it, is not.
> 
> If you can’t share your repository for whatever reason, consider creating a dummy repo that you _can_ share, which reproduces the problem you’re experiencing.

---

<div class="post-metadata">

**Author:** ![gerbreown](https://avatars.discourse-cdn.com/v4/letter/g/8c91f0/32.png) [@gerbreown](https://discourse.gohugo.io/u/gerbreown)\
**Post date:** [December 11, 2022, 9:42am UTC](https://discourse.gohugo.io/t/posted-date-on-pages-showing-january-1-0001/41813/7 "2022-12-11T09:42:02Z")

</div>

After doing much research on the Internet because I did not receive a see a valid response on this site I tried a number of things I found there. The next day my problem was solved and now I get valid dates on my posts.
