For XML and JSON the definition of how to format data is part of the file definition. There is only one way to format a decimal in an XML and only own way to format a date in JSON. Both of them are using ISO8601.

But when it comes to CSV, there are no rules. If you don’t specify anything, BCCL will apply ISO8601 to CSV files also. But there are two options for adjusting the formatting:

  1. Using the -a <languageId> parameter when calling BCCL
  2. Using the Format attribute in a mapping file to specify formatting for a single field.

Using the -a <languageId> parameter

You can specify a regional behavior by applying the languageid parameter:

 BCCL -t getdata -s table=18 -f csv -a 1030

This example will get data with Danish language rules (Danish is LanguageId 1030). So dates will be formatted as dd/mm/yyyy and decimal will be with a comma as decimal separator.

See all language IDs here

Using the Format attribute in mapping files

BCCL uses standard DotNet formatting for single fields. In the example below, the Credit Limit field will be formatted with four fixed decimals because the F4 code has been specified.

   "FieldNo": 20,
   "FieldName": "Credit Limit (LCY)",
   "MappedName": "Credit_Limit__LCY_",
   "Format": "F4",
   "Validate": true

You can find all the formatting code here:

In the example below, we are formatting the Posting Data like 2019-17-02 for the 17th of February 2019.

   "FieldNo": 20,
   "FieldName": "Posting Date",
   "MappedName": "Posting_Date",
   "Format": "yyyy-dd-MM",
   "Validate": true

Here are the complete list of formatting options:

Standard Decimal formats

Standard Date and Time formats

Custom Date and Time formats

You can also combine the LanguageId and Format methods in a single call.