please advise on how to convert the numeric value into time using SAS software. I am using the market depth (TRTH), and the time is shown in numeric. For example, 48600044.
Thanks
@cedre.casey
I understand that you want to interpret value in the "BID_TIM_MS" field. The "_MS" field is a millisecond time field. The field represents the number of milliseconds past midnight GMT. The field is in Integer data format.
For example the 13:30:0:044 can be converted from 48600044 milliseconds. Below is how the value is generated.
Hour: 13 * ( 60 * 60 * 1000 ) = 46800000 millisecondsMinute: 30 * ( 60 * 1000 ) = 1800000 millisecondsSecond: 0 * ( 1000 ) = 0 millisecondsMillisecond: 44 millisecondsTotal: 46800000 + 1800000 + 0 + 44 = 48600044 milliseconds.
To interpret values of the millisecond time field, you can use the following formula.int msec = time_ms%1000; int seconds = (((int)(time_ms/1000)) % 60); int minutes = (((int)(time_ms/60000)) % 60); int hours = (((int)(time_ms/3600000)) % 24);
Hi @cedre.casey, Please contact vendor the support on conversion. I see that SAS has community support at https://communities.sas.com.
We can only help with Refinitiv API related questions.
Thanks. Will do