Skip to Content

PI 7.4 Date mapping functionality

Hi Experts,

I wish to add the following date functionality to a scenario:

Whereby if a date is less than or greater than 52 weeks over the current date, then for pi to pass the current date, else use the supplied date.

I was thinking I could use the if statement, and an OR statement, but I'm not sure what the best/most effective way to do this would be!

I was thinking datebefore and dateafter might be used, but not sure why they would have two inputs and just the one output.

Can anyone suggests what I might do?

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Sep 23, 2015 at 04:08 PM

    Hi George,

    With DateTrans function you can work with weeks as well. Check this blog Yes it is possible with DateTrans function!, it could be helpful to work with dates.


    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 23, 2015 at 08:59 PM

    As Inaki mentioned you can use standard date function. "dateTrans" and use output format as ww to get the week number..with if else combination...

    Capture.PNG (17.9 kB)
    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.