Mitch_Denis_38

How to find last day of last month

Discussion created by Mitch_Denis_38 on Sep 8, 2014
Latest reply on Sep 16, 2014 by Kay_Browning_372
We had a question come into support recently asking how to find the last day of last month.  The easiest way I've been able to find this is below.  Does anyone else have a good way that they do this?
:set &today# = &$PHYS_DATE_YYYYMMDD# :set &day_of_month# = str_cut(&today#, 7) :set &last_day_of_last_month# = sub_days(&today#, "&day_of_month#") :P "Today is &today#" :P "Last day of last month is &last_day_of_last_month#"

Outcomes