I've trying to create a snippet where I insert a date (MM/DD/YY), it recognizes the month, and it shows me a specific result I already have

Hi there,

First of all, thanks so much for your great tool. TextBlaze has helped me a lot, a lot a lot, and it makes my work easier.

Moving forward, recently I've been moved to another department, and I'm trying to make it as easy as possible.

Now I'm trying to create a snippet where I can insert in a formtext any specific date, for example 1/25/22 at 2:59pm CST. Based on that, I want the snippet to show me based on the month a specific result that I already have.


I insert 1/25/22 at 2:59pm CST (January). If it is January, I want it to show me ''April 6th''.
I insert 4/13/22 at 12:09pm CDT (April) If it is April, I want it to show me ''June 4th''.

Any ideas? I do appreciate your help guys. Thanks so so much.

1 Like

Hey @Juan_Camillo_Sanchez,
Welcome to the forum!
Does this work? I only added three months:

{monthly_sentences=["1"="April 6th","2"="May 2nd","4"="June 4th"]}
{formtext: name=date}{if: testregex(date, "\d*/\d*/\d*")}{month=extractregex(date, "(\d*)/\d*/\d*")}{=monthly_sentences[month]}{endif}


Thanks so much, Dan. This has helped me a lot. I do appreciate your help. Thanks so so much. :pray:

Hi @Juan_Camillo_Sanchez

Is the generated date always a specific time frame in the future?

Can you give me a real-world scenario of how you would be using this? Maybe there's a way to make it even better.