Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Today is a palindrome

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Today is a palindrome

    It goes something like this: DO Day_nbr = 730769 to 999999 if Translate('abcdefgh', Date('s',day_nbr,'b'),'hgfedcba') = Date('s',day_nbr,'b') then say Date('s',day_nbr,'b') is a palindrome. end; exit OK so it was six lines. I'll refund your money. bobh

    Comment


    • #17
      Today is a palindrome

      Bob what do the DATE second and third arguments do?
       Date('s',day_nbr,'b')

      Comment


      • #18
        Today is a palindrome

        The 400/rexx does not have the full-blown rexx date function; but MF and OBJREXX do. the first parm is the output date format, the second is the date in the format indicated by the third parm. S = ccyymmdd B = number of whole days since AND including 01 Jan 0001. Like most stuff on the 400, this system program is short-changed. Amazingly, REXX api is part of DB2 on the 400; go figure!! bobh

        Comment


        • #19
          Today is a palindrome

          I just realized that going by a 6 digit date today (Oct 11th) is a palindrome. 10/11/01 101101

          Comment


          • #20
            Today is a palindrome

            I must have too much free time today. 10/22/01 is next (102201).... This is quite addictive.

            Comment


            • #21
              Today is a palindrome

              In case anybody's interested .... If you store your dates in mm/dd/yyyy format, then today's date reads the same forward or backwards. Your mission, should you choose to accept it, is to figure out when that happens next.

              Comment

              Working...
              X