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
Accepted answer

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");
One other answer

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.