question

Upvotes
Accepted
1 0 1 1

how to change the date format ?

Hello,

With the request “ ElektronTimeseriesExtractionRequest”, is it possible to have the field Date in the format dd/mm/yyyy instead of yyyy/mm/dd ?

The request’s body:

aJSON = new JSONOrderedObject()
             
.put("ExtractionRequest", new JSONOrderedObject()
.put("@odata.type", "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.ElektronTimeseriesExtractionRequest")
 .put("ContentFieldNames", new JSONArray()
	.put("RIC")          
	.put("Trade Date")                             
        .put("Asset Type Description")            
        .put("Security Description")         
        .put("ISIN")          
        .put("Exchange Code")          
        .put("Currency Code")            
        .put("Market MIC")        
)              
    .put("IdentifierList", new JSONOrderedObject()
    	.put("@odata.type", "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList")
        .put("InstrumentIdentifiers", aListeInstruments)    )                
    .put("Condition", new JSONOrderedObject()                              
        .put("StartDate", GererDate.VeilleStartDate())        
        .put("EndDate", GererDate.VeilleEndDate())        
    )              
    );


The result :

RIC,Trade Date,Asset Type,Asset SubType,Security Description,ISIN,Exchange Code,Currency Code,Market MIC

KBC.BR,2017/07/27,EQTY,ODSH,KBC GROEP ORD,BE0003565737,BRU,EUR,XBRU

GIMV.BR,2017/07/27,EQTY,ODSH,GIMV ORD,BE0003699130,BRU,EUR,XBRU

UCB.BR,2017/07/27,EQTY,ODSH,UCB ORD,BE0003739530,BRU,EUR,XBRU

SIOE.BR,2017/07/27,EQTY,ODSH,SIOEN INDUSTRIES ORD,BE0003743573,BRU,EUR,XBRU

ACKB.BR,2017/07/27,EQTY,ODSH,ACKERMANS ORD,BE0003764785,BRU,EUR,XBRU

Thanks,

tick-history-rest-apidate
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvotes
Accepted
13.7k 26 8 12

@jeanmarc.legall, I searched, but could not find a way to change the format of the data returned by the server. I believe this is actually not possible.

The only solution I see is to do it programmatically after data retrieval.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea