[url=“JDK 19 Documentation - Home”]JDK 19 Documentation - Home has the list of allowable pattern letters and their meanings.
I’m not sure what “DDDDDD” will do as “DDD” is day in year.
[url=“http://www.myriadit.co.nz/jdedates.htm”]http://www.myriadit.co.nz/jdedates.htm[/url] has a good description of the format of JDE dates:
[begin]
For those of you that don’t know the date format stored is as follows
CYYDDD
C=Century, 0=19, 1=20, 2=21
YY=Last two digits of the year
DDD=day where 001=01 Jan, and 365=31 Dec or 30 Dec (leap year)
[end]
Unfortunately, the convention JDE apparently uses for indicating the century isn’t a standard convention and isn’t something supported by SimpleDateFormat.
You may be okay if you ignore the century indicator. Do a substring to get the last 5 chars from the string and then pass that substring to pub.date:dateTimeFormat with a current pattern of yyDDD. That should get you what you need.
If you can’t ignore the century indicator, then you’ll need to do a bit more work. Get a substring of the 1st char, placing it in var named centuryIndicator or something. Then branch on it to do this:
BRANCH on /centuryIndicator
…0 : MAP (set centuryStr to 19)
…1 : MAP (set centuryStr to 20)
…2 : MAP (set centuryStr to 21)
Then get the last 5 chars from the date string and append those to the centuryStr and pass the entire new string to dateTimeFormat with a pattern of yyyyDDD.
HTH.
#webMethods#Integration-Server-and-ESB#Flow-and-Java-services