Options

Operating System Setup

sabzamsabzam Member Posts: 1,149
Hi Everybody,

I am currently working on dataports and have an issue with different regional settings. Is it possible to check out the regional settings from Navision so as to create an IF statement accordingly?

Comments

  • Options
    Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    Hi,

    I don't know direct methods of finding regional settings, but sometimes when I need to know how to parse date and decimals I'm using the following trick:

    DateTxt := Format(23451231D);
    DecimalTxt := format(5432.10);

    Then I'm searching for '2345' string in DateTxt to learn whether the default system formatting is 2345/12/31 or 31/12/2345. Similar with DecimalTxt - 2nd character is telling me what is character is used as thousands separator, and if it is '4' then I know there is no thousands separator used. 6th (or5th) character of DecimalTxt is telling me me what is used as decimal separator...

    Regards,
    Slawek
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
Sign In or Register to comment.