Rocket OpenQM

 View Only
  • 1.  Recent date issue

    PARTNER
    Posted 01-10-2023 11:41
    We ran into this recently and I thought I'd share.
    In the legacy/character version of our software, we normally prompt for dates using a two digit year (mm-dd-yy), iconving and oconving as needed.  Recently, a user entered "12-31-33" as a date.  The iconv returned -12418 (12-31-1933) rather than the expected value of 24107 (12-31-2033). 
    After researching this we discovered that Pick/Rocket and QM both default to dates entered with 2 digit years greater than 30 to be in the 1900's, years less than 30 as assumed to be in the 2000's  Note: iconving a date with a 4 digit year always returns the correct value..  QM does have a config setting that will allow you to override the cutoff, however rather than remembering to change the config setting every few years on every user system, we opted to add code to our legacy system that checks the iconv'ed value and adjusts it as needed.


    ------------------------------
    Ben Cramer
    Owner
    Dealer Solutions LLC
    Mansfield TX US
    ------------------------------


  • 2.  RE: Recent date issue

    ROCKETEER
    Posted 01-10-2023 12:01
    Hi Ben,

    I thought all multivalue products did this. Maybe not.

    The start of the 100 year window in which two digit year numbers are assumed to be is controlled by the YEARBASE configuration parameter. It defaults to 1930 but can be changed in the qmconfig file or (probably very confusingly) for a specific session by use of the CONFIG command.


    Martin