cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

todays date in Query builder

bwilson-2
4-Participant

todays date in Query builder

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

2 REPLIES 2

Function: Days Difference, Function SysDate - Create Date

Hi Brian,

Here are the qml tags, which I used to create query condition.

<condition>
<operand>
<function heading="Time" difference(days)&quot;<br="/>name="TIME_DIFFERENCE_IN_DAY" type="java.math.BigDecimal">
<function heading="To" date&quot;=" name="TO_DATE"&lt;br"/>type="java.util.Date">
<function heading="System" date&quot;<br="/>name="SYSDATE" type="java.util.Date"/>
</function>
<function heading="To" date&quot;=" name="TO_DATE"&lt;br"/>type="java.util.Date">
<column alias="Audit" record&quot;<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"&lt;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
>

Announcements

Top Tags