Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Jakob Dahl 2 posts 71 karma points
    Dec 29, 2023 @ 14:48
    Jakob Dahl

    Date format on article lists

    It took me some time to figure out, but if anybody has the same problem as me here is one way to do it. The American date format is not always practical and I found a way to set the format in the dictionary. Create a dictionary item Article.OnDateFormat and change line 45 in partial view latestArticlesRow.cshtml to

    @Umbraco.GetDictionaryValue("Article.On") @article.ArticleDate.ToString(@Umbraco.GetDictionaryValue("Article.OnDateFormat"))

    Then it is possible to have all the date formats needed

  • Paul Seal 524 posts 2889 karma points MVP 6x c-trib
    Dec 31, 2023 @ 14:08
    Paul Seal

    Hi thanks for sharing this. I will add it to the starter kit for newer versions to benefit from it.

Please Sign in or register to post replies

Write your reply to: