# Can I change the date format to "DD-MM-YYYY"?

**URL:** <https://discourse.gohugo.io/t/can-i-change-the-date-format-to-dd-mm-yyyy/25763>\
**Category:** support\
**Created:** [May 23, 2020, 5:57am UTC](https://discourse.gohugo.io/t/can-i-change-the-date-format-to-dd-mm-yyyy/25763 "2020-05-23T05:57:00Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![UtkarshVerma](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/utkarshverma/32/11273_2.png) [@UtkarshVerma](https://discourse.gohugo.io/u/UtkarshVerma)\
**Post date:** [May 23, 2020, 5:57am UTC](https://discourse.gohugo.io/t/can-i-change-the-date-format-to-dd-mm-yyyy/25763/1 "2020-05-23T05:57:00Z")

</div>

I was wondering if it is possible for me to specify dates in the frontmatter using this format.

---

<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:** [May 23, 2020, 1:44pm UTC](https://discourse.gohugo.io/t/can-i-change-the-date-format-to-dd-mm-yyyy/25763/2 "2020-05-23T13:44:18Z")

</div>

No.

Obviously, the timestamp is generated for you when you create new content with `hugo new post/foo.md`.

If I have to change the timestamp to the current time, I rely on my editor to insert the text in the correct format. Most editors have the ability, either natively or through a plugin/extension, to insert a timestamp in a predetermined format. That makes things a little easier.

---

<div class="post-metadata">

**Author:** ![ArtA](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@ArtA](https://discourse.gohugo.io/u/ArtA)\
**Post date:** [May 23, 2020, 6:30pm UTC](https://discourse.gohugo.io/t/can-i-change-the-date-format-to-dd-mm-yyyy/25763/3 "2020-05-23T18:30:53Z")

</div>

Please, pretty please, **only** use dashes in ISO format dates. Dash was selected as the separator for the reason of not being in use in any other format.

Using dash in any other format is just an effort to break the standard.

---

<div class="post-metadata">

**Author:** ![UtkarshVerma](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/utkarshverma/32/11273_2.png) [@UtkarshVerma](https://discourse.gohugo.io/u/UtkarshVerma)\
**Post date:** [May 24, 2020, 2:33am UTC](https://discourse.gohugo.io/t/can-i-change-the-date-format-to-dd-mm-yyyy/25763/4 "2020-05-24T02:33:49Z")

</div>

I think you’ve misunderstood me.

I’m working on a website in which I need people to fill out their birth dates, and here in India, everyone is used to DD-MM-YYYY format, so I’m not worried about the timestamp, I just want to format the `birthdate` frontmatter parameter in this format, and Hugo expects `YYYY-MM-DD` format, so I was wishing I could change this expected format to `DD-MM-YYYY`.

---

<div class="post-metadata">

**Author:** ![UtkarshVerma](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/utkarshverma/32/11273_2.png) [@UtkarshVerma](https://discourse.gohugo.io/u/UtkarshVerma)\
**Post date:** [May 24, 2020, 2:35am UTC](https://discourse.gohugo.io/t/can-i-change-the-date-format-to-dd-mm-yyyy/25763/5 "2020-05-24T02:35:31Z")

</div>

I’m using dashes only.

---

<div class="post-metadata">

**Author:** ![edcous](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/edcous/32/11459_2.png) [@edcous](https://discourse.gohugo.io/u/edcous)\
**Post date:** [May 24, 2020, 2:29pm UTC](https://discourse.gohugo.io/t/can-i-change-the-date-format-to-dd-mm-yyyy/25763/6 "2020-05-24T14:29:44Z")

</div>

So how are the users entering the dates? An HTML form?

---

<div class="post-metadata">

**Author:** ![UtkarshVerma](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/utkarshverma/32/11273_2.png) [@UtkarshVerma](https://discourse.gohugo.io/u/UtkarshVerma)\
**Post date:** [May 25, 2020, 3:40am UTC](https://discourse.gohugo.io/t/can-i-change-the-date-format-to-dd-mm-yyyy/25763/7 "2020-05-25T03:40:52Z")

</div>

Yeah, I’m using Google Forms to get a CSV file which I’ll process using a script to convert into frontmatter. I know that I can transform the date format from input to Hugo’s default date format using the script, but it was just plain curiosity whether Hugo supports different date formats or not.

---

<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:** [May 25, 2020, 2:47pm UTC](https://discourse.gohugo.io/t/can-i-change-the-date-format-to-dd-mm-yyyy/25763/8 "2020-05-25T14:47:22Z")

</div>

> [@jmooring](#):
>
> No.

The name of the date field (date, expiryDate, birthday) is irrelevant. Examples:

```auto
2020-05-23
2020-05-23T16:35:16
2020-05-23T16:35:16.123
2020-05-23T16:35:16-04:00
2020-05-23T16:35:16.123-04:00

```

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/system/32/1_2.png) [@system](https://discourse.gohugo.io/u/system)\
**Post date:** [May 27, 2020, 2:47pm UTC](https://discourse.gohugo.io/t/can-i-change-the-date-format-to-dd-mm-yyyy/25763/9 "2020-05-27T14:47:27Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
