question

Upvotes
Accepted
23 5 11 13

FID 1010 Format

Hi Sir

One of my client , when they use RFA API to retrieve CNH= -> FID 1010, they find the date display is with 2 format : XX:XX:XX and XX:XX. They want to understand in what kind of situation TREP will delivery XX:XX .

Meanwhile when we check with Data team, they feedback all date they delivered is with XX:XX:XX format.

Below is the screen shot for XX:XX format. and log is attached;

treprfarfa-api
fid.png (4.6 KiB)
icon clock
10 |1500

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

Upvotes
Accepted
20.3k 73 10 20

hi @jessie.lin

Did your developer get this resolved?

Looking at the sample code you provided, my guess above applies.

Their is a parseData() method which calls ps.println(data) and this should make use of the stringTo() methods of the data.

To be honest the above is not really RFA specific, it is standard Java functionality.

icon clock
10 |1500

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

Thank you , let me double confirm with developer.

Upvotes
23 5 11 13

LINK: https://pan.baidu.com/s/1geUaQ7x PWD: i7pm

please download log from here, Thank you!

icon clock
10 |1500

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

Upvote
20.3k 73 10 20

Hi @jessie.lin

I just checked your output file and searched for FID 1010 values and below is an extract.

Line 4705: 	FIELD_ENTRY 1010/VALUE_TS1: 09:47:59
Line 4805: 	FIELD_ENTRY 1010/VALUE_TS1: 09:47:59
Line 4909: 	FIELD_ENTRY 1010/VALUE_TS1: 09:47:59
Line 5009: 	FIELD_ENTRY 1010/VALUE_TS1: 09:47:59
Line 5116: 	FIELD_ENTRY 1010/VALUE_TS1: 09:47:59
Line 5220: 	FIELD_ENTRY 1010/VALUE_TS1: 09:48
Line 5324: 	FIELD_ENTRY 1010/VALUE_TS1: 09:48
Line 5428: 	FIELD_ENTRY 1010/VALUE_TS1: 09:48
Line 5528: 	FIELD_ENTRY 1010/VALUE_TS1: 09:48
Line 5632: 	FIELD_ENTRY 1010/VALUE_TS1: 09:48
Line 5736: 	FIELD_ENTRY 1010/VALUE_TS1: 09:48
Line 5836: 	FIELD_ENTRY 1010/VALUE_TS1: 09:48
Line 5936: 	FIELD_ENTRY 1010/VALUE_TS1: 09:48
Line 6036: 	FIELD_ENTRY 1010/VALUE_TS1: 09:48
Line 6140: 	FIELD_ENTRY 1010/VALUE_TS1: 09:48
Line 6244: 	FIELD_ENTRY 1010/VALUE_TS1: 09:48:01
Line 6348: 	FIELD_ENTRY 1010/VALUE_TS1: 09:48:01
Line 6452: 	FIELD_ENTRY 1010/VALUE_TS1: 09:48:01
Line 6556: 	FIELD_ENTRY 1010/VALUE_TS1: 09:48:01
Line 6656: 	FIELD_ENTRY 1010/VALUE_TS1: 09:48:01
Line 6760: 	FIELD_ENTRY 1010/VALUE_TS1: 09:48:01
	<br>

If you look through the file and also based on the extract above, the VALUE_TS1 is being returned with hh:mm:ss and displayed as such. The only time you see hh:mm format is when the seconds are '00'.

So, it would appear that the application code that extracts the Time value or Prints the time value is choosing not to print the seconds part if it is 0 / blank / empty.

Update:

I modified one our RFA Java examples to explicitly output hh:mm:ss:ms regardless of value and I see the following

....
if (entry.getFieldId()==1010)
{
        ps.print("/");
        OMMData data = entry.getData(def.getOMMType());
        OMMDateTime dt = (OMMDateTime)data;
        int hr = dt.getHour();
        int min = dt.getMinute();
        int sec = dt.getSecond();
        int msec = dt.getMillisecond();
        ps.print(hr + "::" + min + "::" + sec + "::" + msec);
}
....
Output:

FIELD_ENTRY 1010/10::24::51::0/VALUE_TS1: 10:24:51
FIELD_ENTRY 1010/10::25::0::0/VALUE_TS1: 10:25
FIELD_ENTRY 1010/10::25::4::0/VALUE_TS1: 10:25:04

So, as you can see when seconds are blank my code displays ::0 - but the existing example code does not display the seconds value.

icon clock
10 |1500

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

Upvotes
23 5 11 13

LINK: https://pan.baidu.com/s/1dFEMnbN PWD: a2ui

The application is in link, actually it is the source code provided by Technical solution trainer of TR, could you help have a look where is the problem to lead this display hh:mm issue ? Thank you!

icon clock
10 |1500

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

Upvotes
20.3k 73 10 20

I am on leave for a few days now. I would guess it is the toString() method that is being used to output the field value to the screen or file.

The developer should replace that with their own code, similar to my snippet above

icon clock
10 |1500

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

Click below to post an Idea Post Idea