Sidebar

What is the best way to format date in each RXA-16 element?

0 votes
353 views
asked Feb 17, 2015 by rdzanski-1356 (210 points)
If RXA-16 is not blank and contains a date, format it as YYYYMMDD for each RXA-16 element.

1 Answer

0 votes
This code will format the date as YYYYMMDD in each  RXA-16 field if the field is not blank. 
 
var values = message.getAllNodes("RXA-16");
for (var i=0 ; i < values.length ; i++) {
   var value=values[i]+'';
   if (value !== ''){
message.setNode('RXA['+(i+1)+']-16', qie.formatDate("yyyyMMdd", qie.deduceDate(value)));
}
}
answered Feb 19, 2015 by terrie-g-7436 (3,950 points)
...