How do I take one month as an input and return the next month chronologically as the ouput

I’m trying to setup a module so that it takes in the month, in my case it’s August (which is assigned to a variable named ‘15. $2’ and then outputs the next month e.g. September.

I have tried using the AI assistant but it spits out some dodgy js code that doesn’t work and I am no further forward, this seems like quite a simple task but I can’t figure it out.

Basically I have parsed the month from the name of a file earlier in my scenario and need to store the variable of the next chronological month so that I can name a file by that month.

Also it is worth noting that if the variable collected is December, then I need the output to be January

Please help

Thanks

Hey TomH

Can you tell/show the input.

Is it just the text “August” or is it a date e.g. “01-08-2024” and how do you want the output?

Kind regards
Riko

text parser

Thanks for the reply Riko

The Text Parser outputs August as text. I need the output from the next stage to be the text output of September (or the next chronological month depending on the output of $2)

Hey Tom

Here is a solution, it is spread out, but you can combine the functions in each variable to make it look smooth.

Here is the finctions used (date) and the tokens needed for formatting:

Date Time Functions

Date Time Tokens

Hope this helps :slight_smile:

Months.json (10.5 KB)

Kind Regards
Riko

Thanks Riko, It looks like I’ve got it working now - is there a way to use less operations to achieve the same thing? You mentioned combining the functions but I’m not sure how I would do that in practice

Hey TomH

Finally got the time to respond.

Her is an updated blueprint.
Parse Date - Add Month - Format Date.json (13.3 KB)

Only uses one operation. :+1:

1 Like

Awesome, thanks Riko!

1 Like

Hey Tom.

Not a problem. :+1:

Glad I could help.

/Riko