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

10|10000 characters needed characters exceeded

### Related questions

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.

Best Regards,

Vítor Vieira

10|10000 characters needed characters exceeded