cancel
Showing results for 
Search instead for 
Did you mean: 

Getting a time stamp out of a XI message

Former Member
0 Kudos

Hi,

I'm getting an output message from XI in the format below

#1.5

#00145E489D04016C0001031700130074000447C39A926E35#1204805344325#.................................

I would like to know how I could get a time stamp out of this message. If possible using a JAVA program.

Thanks,

Roshan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Rama,

The value what you have is the filename or the output payload message from XI? Can you please be more specific?

Regards,

---Satish

Former Member
0 Kudos

Hi,

It is an output payload message from XI. How do I go on getting a time stamp from it using a program written in java?

Thanks

Former Member
0 Kudos

Hi Rama,

Are you doing message mapping? If yes then you can map to any segment using substring functionality. Then using variable substituition you can achieve the desired output.

Regards,

---Satish

prateek
Active Contributor
0 Kudos

Where exactly do u want to use this timestamp. If in mapping, then u may use another java mapping in same interface mapping in which this payload can be parsed using DOM parser.

Or u may write an adapter module which may read the payload and pick up the required data

Regards,

Prateek

Answers (3)

Answers (3)

Former Member
0 Kudos

sorry,

I was mistaken.

This is a representation of the Time Stamp of a JAVA default trace file.

I want to convert this string to a time stamp.

how do i go about doing this?

Thanks

Former Member
0 Kudos

if the time stamp is from the payload , u have to extract this from the payload using a user defined function or the substring functionality . Once it is extracted, map it to the output xml tag and after you do that you have to check the variable substitution option in you receiver adapter , after which you can use it easlily.

Former Member
0 Kudos

Hi ,

If the you want to extract the time stamp from the payload you can write a user defined function in you message mapping in which you can have the code for extracting the time stamp . And once the time stamp is extracted throgh the code you can assign it to the appropriate target tag.

But if you just need a timestamp appended to the file created you only have to check the time stamp option in the outbound processing parameters of your receiver file adapter.

Thanks & regards,

Rahul.