Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
| |||||
Hi @all, looks like i'm flooding this forum in the last days... Here comes my latest question: In a form we have three date-fields. We want to fill one field by hand ("delivery date") and then we want to have the other two fields filled automatically with dates like five weeks before delivery date and so on. How can i do that without using trigger? thanks, Jens |
| |||
Posted By: cstoss Posts: 46 / From: United Kingdon / Registered: Jun, 2005 | |||
Jens, If you truly want "5 weeks before", that can be translated as "5 7 day periods before", which would be the computation: "dateField - 35" Since date subtraction is done by days. From the Inetgrity Admin Guide. Section Timestamp Operations: - timestamps can be subtracted or added to a constant integer, for example, now()+5 or now() - 5 Integer constants are treated in units of days; for example, timestamp + integer constant takes the specified time and adds a specified number of days. When subtracting two timestamps, the number of days between the two dates rounded to the nearest day is the result. Using other operators or a floating point results in an error. Regards, Craig Stoss |
|
|