cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

How to get previous month or next month based on current date in Nintex workflows? Please help

Jump to solution

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? 

Labels: (1)
0 Kudos
Reply
3 Replies
Workflow Hero

Re: How to get previous month or next month based on current date in Nintex workflows? Please help

Jump to solution

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

Reply
Workflow Hero

Re: How to get previous month or next month based on current date in Nintex workflows? Please help

Jump to solution

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  

0 Kudos
Reply
Workflow Hero

Re: How to get previous month or next month based on current date in Nintex workflows? Please help

Jump to solution

That did the trick. Thank you  

Reply