I have a field where we store month like January, February.. December.. I have a requirement to fetch last month records. I am trying to get previous month based on current date. But unable. To figure out how to do that. Is there an easy function where I can add / subtract and get desired month based on current date?
Did you have a look into the calculate date action? You can use the current date as base and then enter -1 into the month field. This will subtract one month from the date and return it as a date variable that you can use.
you can also do this with positive values which will add a month.
I understood that you have saved the date in your list with full month names, like January, February and so on.
You can add a set variable action after you calculated the date and set a text variable (Like month name) with the following inline function
fn-FormatDate(yourcalculateddate, “MMMM“)
This will convert your date to a text containing only the name of the month name of that date.
Hope this helps a bit.
Best regards,
Enrico
Oh, I see what you are saying. So I use calculate date action and set month as - 1 based on action execution date, get the date, and use formatdate function to convert date in actual month string. Trying it out now. Thank you so much for guidance
That did the trick. Thank you
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.