I would like to convert the millisecond time field (ex: SALTIM_MS, QUOTIM_MS, ...) that are stored as unsigned integers to HH:MM:SS.mmm format. As the RWF field type for these fields are UINT64, they can't be easily identified as time fields during decoding of the message.
Yes, you need to use both the suffix "_MS" and UINT64 to identify those fields because there are others fields which have suffix "_MS" and TIME as a RWF type.
TRDTIM_MS "TRDTIM MS" 3853 NULL INTEGER 15 UINT64 4 SALTIM_MS "SALTIM MS" 3854 NULL INTEGER 15 UINT64 4 QUOTIM_MS "QUOTIM MS" 3855 NULL INTEGER 15 UINT64 4 TIMCOR_MS "TIMCOR MS" 3856 NULL INTEGER 15 UINT64 4 ... ... EURO_AL_MS "EURO ASK LOW TIME" 14169 NULL INTEGER 15 TIME 5 EURO_AO_MS "EURO ASK OPEN TIME" 14170 NULL INTEGER 15 TIME 5 EURO_BH_MS "EURO BID HIGH TIME" 14171 NULL INTEGER 15 TIME 5
The values in those fields (with suffix "_MS" and UINT64) represent time stamp in milliseconds within a day. You can use the below logic to convert milliseconds within a day to time.
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);
Due to an outage of the Thomson Reuters Developer Community email notification system from 2:30 PM CDT on November 29th until 9:00 AM CDT on November 30th we are posting to all questions updated during this timeframe in order to ensure all customers receive all relevant email updates. Please review this question, and its associated answers, in order to ensure you are aware of any possible updates that may have occurred during this outage. We apologize for the delay and any inconvenience this has caused.
Matthew Logterman, J.D.
Sr. Product Manager, Thomson Reuters Developer Community