how to interpret the OmmTime.Hour's "Gets Hour. Range is 0 - 23 where 255 indicates blank." comment

I am using C#, I am wondering how I should interpret the OmmTime.Hour's "Gets Hour. Range is 0 - 23 where 255 indicates blank." comment. Other fields of OmmTime, such as the Minute and Second fields, have similar description. Does it mean the entire OmmTime structure should be considered invalid?

image

Also, from another question I posted on the Refinitiv's forum: https://community.developers.refinitiv.com/questions/116730/how-to-handle-omminvalidusageexception-attempt-to.html

There is another generic way to check whether or not a field is empty. How should I understand the existence of these two seemingly identical features?


Best Answer

  • Jirapongse
    Answer ✓

    @vnaik01

    Thank you for reaching out to us

    In EMA C#, you can check if the data is blank by using the following code.

        private static void Decode(FieldList fieldList)
        {
            foreach (FieldEntry fieldEntry in fieldList)
            {
                Console.Write("Fid: " + fieldEntry.FieldId + " Name = " + fieldEntry.Name + " DataType: " + DataType.AsString(fieldEntry.Load!.DataType) + " Value: ");


                if (Data.DataCode.BLANK == fieldEntry.Code)

    ...

    You can refer to the 290_Custom_Decode example in the RTSDK C# package.

Answers

  • Regarding the generic way to check whether a field is empty, it's common to have multiple methods for achieving the same result. It's possible that the two features serve different purposes or have different use cases, even if they appear to be identical. It might be helpful to consult the documentation or seek clarification from the community to better understand when to use each approach. By the way, have you tried using a time card calculator for your time-related tasks?

  • Both methods can be seen as complementary—field value Tunnel Rush checks for specific blank fields, and exception handling for more comprehensive error checking when working with OmmTime objects.