in reply to get previous month in two digit number

Mixed bag of answers above, but you didn't really provide enough info to answer the question in a manner calculated to deal with your source data and, thus, with your use case/problem.

The key missing specific: in what form is your current month -- "July" or 07 or (month and month_day) "7/19" or are you deriving it from time or (any one of several other possibilities)?

We can best provide help directed to your particular issue if you provide that kind of missing info.

Apologies to all those electrons which were inconvenienced by the creation of this post.