Time format in FID 3855 QUOTIM_MS

FID 3855.pngHi Team,

Would you share your insights why real time data feed send the value on FID 3855 QUOTIM_MS in integer format instead of hh:mm:ss:000 format?

and how to programmatically convert this to a timestamp, and to officially sign off that it is IN MILLISECONDS time format?

FID 3855.png

Thanks & Regards,

Xia

Best Answer

  • Jirapongse
    Answer ✓

    @XIA LIU

    The values in those fields (with suffix "_MS" and UINT64) represent timestamps 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);