AnsweredAssumed Answered

Modified Java Script Use

Question asked by Barry Wasmund on Oct 22, 2018

How can I convert a month string like 'JAN' to a string like '01' within a Modified Java Script step?  I have code similar to this: if (TIME == 'JAN') {PostingPeriod = '01' + '/01/' + d.getFullYear();

if (TIME == 'FEB') {PostingPeriod = '02' + '/01/' + d.getFullYear();

if (TIME == 'MAR') {PostingPeriod = '03' + '/01/' + d.getFullYear();

 

...etc

 

It is populating all values to 01/01/2018 even though some of the lines are FEB, MAR, etc.

It appears to be running until it hits one row and then it uses that value for all lines.

Outcomes