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

Announcements

No record found.

News and Announcements icon
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);

  • Suggested answer
    Mohana Yadav Profile Picture
    61,252 Super User 2026 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
    Microsoft Employee 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 676 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 483 Super User 2026 Season 2

#3
AndrewThomas81 Profile Picture

AndrewThomas81 310 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans