ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

just to drive that "other" programmer nuts!

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

  • just to drive that "other" programmer nuts!

    instead of just knowing that last day of the year you can calculate it with big-o-stupid code:

    endofyear and isodate are both defined as date types
    Code:
    endofyear = (((((%date() - %days(%subdt(%date():*d))+%days(1))) 
               - %months(%subdt(%date():*m))+%months(1) )           
               +%years(1))-%days(1) );
    All my answers were extracted from the "Big Dummy's Guide to the As400"
    and I take no responsibility for any of them.

    www.code400.com
Working...
X