Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
Hi all,
i am trying to write a QB query that will give me the age of a WF process. I want to take the created date and subtract it from todays date to get the age. I have a time difference function that has the created date, but I don't know how to pull todays date into the function to have it calculate the difference. Any ideas would be greatly appreciated.
Thanks,
Brian
Hi Brian,
Here are the qml tags, which I used to create query condition.
<condition>
<operand>
<function heading="Time" difference(days)"<br="/>name="TIME_DIFFERENCE_IN_DAY" type="java.math.BigDecimal">
<function heading="To" date"=" name="TO_DATE"<br"/>type="java.util.Date">
<function heading="System" date"<br="/>name="SYSDATE" type="java.util.Date"/>
</function>
<function heading="To" date"=" name="TO_DATE"<br"/>type="java.util.Date">
<column alias="Audit" record"<br="/>heading="Created" isExternal="false" propertyName="createTimestamp"
selectOnly="false" type="java.sql.Timestamp">
thePersistInfo.createStamp
</column>
</function>
</function>
</operand>
<operator type="lessThanOrEqual"/">
<operand>
<constant heading="30" ismacro="false"<br"/>type="java.math.BigDecimal">
30
</constant>
</operand>
</condition>
Thanks,
Avinash
<
On Sat, Jun 4, 2011 at 1:16 AM, Brian Wilson <briwilson@coca-cola.com>wrote:
> Hi all,
>
> i am trying to write a QB query that will give me the age of a WF process.
> I want to take the created date and subtract it from todays date to get the
> age. I have a time difference function that has the created date, but I
> don't know how to pull todays date into the function to have it calculate
> the difference. Any ideas would be greatly appreciated.
>
> Thanks,
>
> Brian
>