Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Can anyone please suggest on how to provide dates to the IWorkItem.RESOLUTION_DATE_PROPERTY in RTC Expressions

Hello All,

We have to use Resolution date range in RTC Expressions using IWorkItem.RESOLUTION_DATE_PROPERTY.

We need to provide the start and end dates, AttributeOperation.BEFORE and AttributeOperation.AFTER.

Following is the code :
Expression resAfterDateExp = new AttributeExpression(resStartDateAttribute,AttributeOperation.AFTER,oldTimeStamp);
      Expression resBeforeDateExp= new AttributeExpression(resEndDateAttribute, AttributeOperation.BEFORE, currentTimeStamp);

however, we are not able to pass the values : oldTimeStamp and currentTimeStamp.

Please help us get this using sample examples if any.

Thanks


0 votes


Accepted answer

Permanent link

I used the following Timestamp code and it is working fine . :)

     Calendar calendar = Calendar.getInstance();
     java.sql.Timestamp currentTimestamp = new java.sql.Timestamp(calendar.getTime().getTime());
    
     java.sql.Timestamp oldTimeStamp = java.sql.Timestamp.valueOf("2017-05-01 10:10:10.0");

Ralph Schoon selected this answer as the correct answer

0 votes


One other answer

Permanent link

This might work, but to get more control, you should be aware, that the product code uses SimpleDateFormat to convert timestamps into strings and strings back into timestamps.


The SimpleDateFormatUtil mentioned in https://rsjazz.wordpress.com/2013/01/02/working-with-work-item-attributes/ is available in the OpenSource Work Item Command Line. The OpenSource Work Item Command Line also has examples to access and convert all existing attribute types.

1 vote

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 11,034

Question asked: May 12 '17, 12:47 a.m.

Question was seen: 3,132 times

Last updated: May 12 '17, 3:29 a.m.

Confirmation Cancel Confirm