Posts Tagged Date

Avoid “not a valid time unit” Errors with Multilanguage Calcdates

I had some problems with a German report giving errors when I tried to run it. The people that programmed it put not only the comments in German, but also all calcdates.

As all calcdates where entered in German when I ran the report in an English client, I got an error that ‘-1T’ was not a valid time unit. This is because in English you need to write D for day not T for Tage.

To avoid errors like this and make your reports multilanguage, always write your date formulas in English surrounded by ‘<’ and ‘>’. The report will now use the correct date calculation mo matter what the language of the client is.

Example: CALCDATE(‘+12M-1T’,BeginnGeschäftsjahr) becomes CALCDATE(‘<+12M-1D>’,BeginnGeschäftsjahr).

The date formula '-1T' should include a time unit.

The date formula '-1T' should include a time unit.

Add comment October 5, 2008


Tags

BIDS Business Intelligence Development Studio C/AL Codeunit Conversion Date Dump Dynamics NAV Excel File Import Invoice List Microsoft Office Multilanguage Postal Code Printing Report Shipment SQL Server SSIS ZIP Code

Blogroll

Dynamics NAV

Recent Comments

mart1n0 on Make Exporting Excel Formulas …
AntidotE on Make Exporting Excel Formulas …
AntidotE on Make Exporting Excel Formulas …
David Singleton on Make Exporting Excel Formulas …