[Progress Communities] [Progress OpenEdge ABL] Forum Post: RE: Calculating the first and last date in a quarter

  • Thread starter Thread starter Stefan Drissen
  • Start date Start date
Status
Not open for further replies.
S

Stefan Drissen

Guest
If you can do it in Excel you can certainly do it in ABL: def var i_dt as date no-undo initial 3/31/2018. def var dtstart as date no-undo. def var iquarter as int no-undo. assign iquarter = truncate( ( month( i_dt ) - 1 ) / 3, 0 ) + 1 . dtstart = date( ( iquarter - 1 ) * 3 + 1, 1, year( i_dt ) ) . message iquarter skip iso-date( dtstart ) skip iso-date( add-interval( dtstart, 3, "months" ) - 1 ) view-as alert-box.

Continue reading...
 
Status
Not open for further replies.
Back
Top