How do I programmatically get creation date of work item's as month and year?
2 answers
https://www.ibm.com/developerworks/rational/library/10/creatingcustomreportswithbirtandrtc-part1/
https://www.ibm.com/developerworks/rational/library/10/creatingcustomreportswithbirtandrtc-part2/
http://www.ibm.com/developerworks/rational/library/10/creatingcustomreportswithbirtandrtc-part3/
http://www.ibm.com/developerworks/rational/library/create-custom-reports-birt-rtc/
Hi - was able to get the answer via enumes..
{
var cDate= dojo.date.stamp.fromISOString(workItem.getValue(WorkItemAttributes.CREATION_DATE));
if(!cDate)
{
cDate = new Date();
}
if (cDate.getMonth() == 0) {
return 'month.literal.l4'; // January
}
if (cDate.getMonth() == 1) {
return 'month.literal.l6'; // Feb
}
if (cDate.getMonth() == 2) {
return 'month.literal.l8';
}
if (cDate.getMonth() == 3) {
return 'month.literal.l10';
}
if (cDate.getMonth() == 4) {
return 'month.literal.l12';
}
if (cDate.getMonth() == 5) {
return 'month.literal.l14';
}
if (cDate.getMonth() == 6) {
return 'month.literal.l16';
}
if (cDate.getMonth() == 7) {
return 'month.literal.l18';
}
if (cDate.getMonth() == 8) {
return 'month.literal.l20';
}
if (cDate.getMonth() == 9) {
return 'month.literal.l22';
}
if (cDate.getMonth() == 10) {
return 'month.literal.l24';
}
if (cDate.getMonth() == 11) {
return 'month.literal.l26'; // Dec
}
return 'month.literal.l2'; //unassigned
}
sharing s it might help anyone else who search for this kind of a solution.
DK
Comments
Arne Bister
JAZZ DEVELOPER Sep 15 '16, 1:52 a.m.1 vote
Dulsanka Kulasinghe
Sep 20 '16, 8:55 a.m.