Skip to Content
author's profile photo Former Member
Former Member

How to change timestamp ?

We have scenario proxy to file(SFTP) PI 7.1

For each trigger from is split into 3 files (multimapping used) with filenames as :




The timestamp should be same for all three files for each trigger.

Now the issue is that even if PI takes one more second for any of the split to process, the timestamp will vary by 1 second.

e.g. for each trigger filenames should be:




if the delay in processing of any of the split is by one second..filenames will be:




As proxy is triggered a number of times a day, I cannot hard code the time part in timestamp.

Can anybody help me in meeting this requirement ?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Jun 06, 2014 at 07:06 PM

    Hi Saurabh,

    If you are using dynamic configuration for file name and setting the file name in mapping, then set the second to 00 in UDF.



    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 06, 2014 at 09:44 PM

    Hi Saurabh,

    IMO, it is not possible to meet this requirement through a standard solution.

    However, What you can do is, let PI create the files in a temp folder with the timestamp (obviously millisecs would change) and get Basis to create a script that move the files to another folder with the timestamp you need by simply copying the time from the first file created to the other 2 files...

    it may also happen that one of the 3 files is created in a different second. This will cater to that eventuality as well.



    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member


      Try the below option.

      Add the time stamp to a field in target side payload in mapping .Use this field value to set the file name in your module.

      Now to remove the field in your target structure use "RemovePayloadValueBean" in your channel.



  • Posted on Jun 08, 2014 at 04:32 PM

    Hi Saurabh,

    If this is triggered via proxy then why not simply add a timestamp as a parameter within the proxy that would be used via each mapping? That way you don't have to worry about how long it takes for PI to process the files.


    Ryan Crosby

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.