question

Upvotes
Accepted
1 1 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 512.0 KiB each and 1.0 MiB total.

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query? If yes please click the 'Accept' text next to the reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,

AHS

Hello again!

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,

AHS

1 Answer

· Write an 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 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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