how to set current date in timestamp attribute in Java Plain API
I create a timestamp attribute in task workitem.
Now I want to set current date in timestamp attribute in Java Plain API. How to program it? have examples? |
One answer
Ralph Schoon (63.5k●3●36●46)
| answered Nov 26 '13, 8:48 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
A timestamp Attribute, if you look at the API e.g. IWorkItem.setDueDate() id of type java.sql.Timestamp.
You can use the PDE to look at that type, you can search in search engines how it is used. It boils down to Timestamp ts=new Timestamp(new Date().getTime()); target.setDueDate(ts); where Date is java.util.Date. There are a few constructors not deprecated, that you can use. Comments
guoping chen
commented Nov 27 '13, 1:08 a.m.
Thanks for your advice.
//set now to date long now= System.currentTimeMillis();By the way, what is the PDE? Could you kindly tell me?How to use it? PDE is the Eclipse Plugin Development Environment. How to use it with the SDK is described here:
|
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.