I am looking for a way to add the previous months name to the filename of an output Excel e.g. Filename_August.xlsx.
I have been trying to do this with Python (I am a Python beginner) as a Private Parameter using the following:
from datetime import date, timedelta
first_day_of_this_month = date.today().replace(day=1)
last_day_prev_month = first_day_of_this_month –timedelta(days=1)
prev_month_name = last_day_prev_month.strftime(“%B”)
print prev_month_name
This works in python but it fails in FME.
Any ideas?