Skip to main content

Notifications

Small and medium business | Business Central, N...
Answered

How to fix date value translation in a report?

Posted on by 73

I would like to have my due date value translated based on the current report language.

If I try to do: FormatDateTime(Fields!DueDate.Value, DateFormat.LongDate), the date will be in french format (my current environment language) but my report is in dutch.Is there a way to fix that?

Thanks in advance

  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 73,339 Super User 2024 Season 2 on at
    RE: How to fix date value translation in a report?

    Hi, just to add some info.

    In Business Central 2023 wave 1 (BC22), Microsoft released the following new features, you can try them out.

    Define regional settings per report using a region property
    https://yzhums.com/35838/

    New Language Selection table (2000000050)
    https://yzhums.com/36738/

    Hope this helps as well.

    THanks.

    ZHU

  • Suggested answer
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 32,748 Super User 2024 Season 1 on at
    RE: How to fix date value translation in a report?

    There is a codeunit called "Type Helper" that codeunit has a function:

       procedure FormatDate(DateToFormat: Date; LanguageId: Integer): Text

    That will return a correcly formatted date accoudring to the language  id you provide.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,228 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,056 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans