web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Multi language issue in CalcDate

(0) ShareShare
ReportReport
Posted on by 410

Hello All,

My following code is not working when I select language German. Session is returning languageID 0. It the language is English then it works fine.

 if MySessionSettings.LanguageId = 1031 then begin
            CurrentDate := CalcDate('-LM', CurrentDate);
        end else
            CurrentDate := CalcDate('-CM', CurrentDate);

I have the same question (0)
  • Suggested answer
    Mohana Yadav Profile Picture
    60,999 Super User 2025 Season 2 on at

    you have to use <>

    if MySessionSettings.LanguageId = 1031 then begin

               CurrentDate := CalcDate('<-LM>', CurrentDate);

           end else

               CurrentDate := CalcDate('<-CM>', CurrentDate);

  • Verified answer
    Asif Shahzad Profile Picture
    410 on at

    Thanks for your reply. I was not using Init() method. thats why it was returning 0.

    Resolved :)

  • Suggested answer
    Marco Mels Profile Picture
    on at

    Thank you for confirming issue resolved and what really resolved it (thank you Mohana).

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,151

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,443 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,092 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans