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

Date Manipulation in the PLD Formula Editor

Hello Everyone

We are busy trying to use the formula editor in PLD 2007 to display the difference ( in days) between the current date and the past posting date. Has anyone examples of how to achieve this?

For Instance

System Date is 2008/07/26

Posting Date is 2008/07/01

Difference is 25 days

regards

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 05, 2008 at 02:41 PM

    Hi Richard,

    There is no function in PLD to do this. You have to create lots of fields and use formulas. Example:

    Assume F_201 has date 1 = 2008/07/26

    Assume F_202 has date 2 = 2008/07/01

    F_220 = Year(F_202) - Year(F_201)

    F_221 = Month(F_202) - Month(F_201)

    F_222 = Day(F_202) - Day(F_201)

    F_301 = X * F_220 , were X is the number of days in a year;

    F_302 = Y * F_221 , were Y is the number of days in a month

    F_401 = F_301 + F_302 + F_222

    This doesn't give you an accurate day difference. For that, you need lots more fields, indicating the number of days in each month, calculate the exact difference of day from one month to the other, etc.

    Or you can catch the PrintPreview and Print events and update a value in the PDL report.

    Use the ReportLayoutItem Object (read more about this in the SDK help file)

    Best Regards,

    Vítor Vieira

    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.