Re: Need Explanation
Posted in 2003
Paul Watson wrote: >> >> let mnth = month(sdate) >> let yr = year(sdate) >> # let edatec = mnth using "&&", "/01/", yr using "&&&&" > > Give me a full first of the month date based on mnth and yr > >> let edate = edatec >> # let edate = extend(edate) + 1 units month - 1 units day > > Set edate to the end of the next month But even as a piece of 4GL code, this is a bit clumsy, because it's depending on the way $DBDATE is set. It would have been much better if the original author used the MDY function: let edatec = MDY(mnth, 1, yr) let edate = MDY(month + 1, 1, yr) - 1 PS - you've thrown some people a red herring by using # as your marker! Probably better to use ! or something then they won't think it's a comment.