Plex 2E

 View Only
  • 1.  ISO Date and Date Details

    Posted Dec 02, 2019 12:40 PM
    So, something odd i've come across and I wanted to see if anyone else has seen this.

    I have a date field DT#(ISO Date) on a screen.  I am converting it to a CYY/MM (for business reasons).  I was using the date details to get me the Year and Month from the field however in my test, I'm using 102030 (6 digit unformatted date on screen) then in the code i'm i'm using the *DATE DETAILS function to return the *YEAR and *MONTH.  I was getting, unpredictable results (it wouldn't work the first time but it would additional times.

    I made a simple PMTRCD to isolate a test/debug.  The first time i enter values and run the function I get 01-01-0001 as the date from the screen (same test date 102030).  Doing nothing else, but pressing enter again, I get year 30 (correct) and month 10 (correct).  I've tested on both CBL/CBI and RPG/RP4 DDS/SQL and get the same results.  It seems like it doesn't convert the value from the screen before it begins processing.

    Anyone seen anything like this?

    ------------------------------
    [Designation]
    CA 2e / IBM I Architect
    CMFirst Group
    [WebsiteUrl]
    ------------------------------