How to get decimal value with dots (100.10) instead of comma (100,10) in .Net SDK Solution?

Hi Team,

We are using the ‘.Net SDK Code based: On Demand: large instrument lists’ and we passed the below attributes list

Requested Field Names = { "RIC", "ISIN","CUSIP", "SEDOL" ," Bid Price”, Bid Clean Price”,” Bid Dirty Price”};

In the response file we have received value for “Bid Price” like “100,20” but we want decimal value with dots “100.20”.

Could you please suggest me how we can change the decimal value from comma to dots.

Best Answer

  • Hi @mithun.ghosh,

    For On Demand extraction you are using, DSS generally provides numeric data with "." decimal separator. There is no method to change the output data.

    However, I have found that the decimal separator in DSS .Net SDK is affected by Windows setting. Could you verify the setting?

    image

    You can also verify the raw data sent from the DSS server in the rowValues variable.

    image

Answers

  • Hi @mithun.ghosh,

    The tutorial uses the Schedule Extraction. You can change number format in the DSS GUI User Preference. If you still find the issue, please provide the snippet code used for creating report template.

    image

  • Hi @Veerapath,

    Thanks for your prompt response.

    I have changed number format in the DSS GUI User Preference, but still in the response file we have received value for “Bid Price” like “100,20”.


    image


    We have used the below code to get the data from DSS server. Could you please suggest us how we can change the decimal value from comma to dots through .net code.


    public RawExtractionResult CreateAndRunEodPricingRawExtraction (

    InstrumentIdentifier[] instrumentIdentifiers, string[] contentFieldNames)

    {

    //Create an on demand extraction, of type EndOfDayPricingExtractionRequest:

    EndOfDayPricingExtractionRequest extractionEod = new EndOfDayPricingExtractionRequest

    {

    IdentifierList = InstrumentIdentifierList.Create(instrumentIdentifiers),

    ContentFieldNames = contentFieldNames

    };

    //Run the extraction.

    //This call is blocking, it returns when the extraction is completed:

    return extractionsContext.ExtractRaw(extractionEod);

    }


    Thanks,

    Mithun