+ Reply to Thread
Results 1 to 3 of 3

Thread: hexadecimal date math

  1. #1

    Default hexadecimal date math

    I think the reason for the strange result is that the x'10' is not a valid packed number. x'010f' or x'1f' would give a 10 day or 1 day difference respectively.

  2. #2
    Guest.Visitor Guest

    Default hexadecimal date math

    No, X'10' should be valid anywhere a numeric literal can be coded. I expect Gene will report the defect to IBM through the usual channels, and a fix should be available in some future release. In the meantime, I hope coding a numeric literal isn't too big a hardship.

  3. #3
    G.Gaunt Guest

    Default hexadecimal date math

    When I run code like this on V5R1:
     H dftactgrp( *no ) datfmt( *usa ) D A S D inz( D'12/17/2002' ) D B S D D C S D /free B = A - %days( X'10' ); dsply B; C = A - %days( 16 ); dsply C; *INLR = *on; /end-free 
    I am surprised to see the following:
    DSPLY 01/01/0001 DSPLY 12/01/2002 
    Doesn't RPG date math work with hexadecimal?

+ Reply to Thread

Similar Threads

  1. dotted decimal IP address into hexadecimal
    By tdaly@sddsystems.com in forum RPG
    Replies: 3
    Last Post: 11-04-2003, 07:05 AM
  2. Floating Point math
    By B.Morris in forum RPG
    Replies: 2
    Last Post: 12-10-2002, 03:18 AM
  3. Date Math in Query/400??
    By Guest.Visitor in forum IBM i (OS/400, i5/OS)
    Replies: 2
    Last Post: 05-08-2001, 07:38 AM
  4. EVAL Limitations for Math
    By Guest.Visitor in forum Application Software
    Replies: 1
    Last Post: 02-16-2000, 11:59 AM
  5. Dynamic Math Calculations
    By Guest.Visitor in forum Programming
    Replies: 3
    Last Post: 11-26-1999, 11:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts