Top Contributor

Name of Month via Calculated Property Help

SOLVE

Hi all, wondering if someone could help me figure out a calculated property.

In one property I have "todays date". No issues there. What I'd like to do is pull the Month from Todays Date in text form. While I can pull the numeric value of the month with existing formulas, I'd like the property instead to show the text name.

For example, I was trying to make an If statement of "If Month(Todays Date)=6, then show "June" but HubSpot is kinda yelling at me something there's something wrong with my property but with no context.

Has anyone done this type of calculated property?

(Yes, I'm aware I can build a helper workflow to input the month name but I was trying to avoid the extra property and workflow)

TY!

1 Accepted solution
Solution
Top Contributor

Name of Month via Calculated Property Help

SOLVE

Hi @spogue,

This is a great question! Big fan of wanting to figure this out without creating workarounds that may be difficult to maintain. Try this but replace 'last modified date' with your Todays Date property:

``````if(month([properties.hs_lastmodifieddate])=1, "January",
if(month([properties.hs_lastmodifieddate])=2, "February",
if(month([properties.hs_lastmodifieddate])=3, "March",
if(month([properties.hs_lastmodifieddate])=4, "April",
if(month([properties.hs_lastmodifieddate])=5, "May",
if(month([properties.hs_lastmodifieddate])=6, "June",
if(month([properties.hs_lastmodifieddate])=7, "July",
if(month([properties.hs_lastmodifieddate])=8, "August",
if(month([properties.hs_lastmodifieddate])=9, "September",
if(month([properties.hs_lastmodifieddate])=10, "October",
if(month([properties.hs_lastmodifieddate])=11, "November",
if(month([properties.hs_lastmodifieddate])=12, "December", "Unknown"
))))))))))))``````

The formula builder is very particular, including case-type for the functions. Posting a screenshot in case it's needed for troubleshooting. That said, please reach out with any questions.

All the Best,

Ryan Schweighart

Whole Hart Impact, LLC

whimpact.co

I help businesses with HubSpot and Zapier.

5 Replies 5
Solution
Top Contributor

Name of Month via Calculated Property Help

SOLVE

Hi @spogue,

This is a great question! Big fan of wanting to figure this out without creating workarounds that may be difficult to maintain. Try this but replace 'last modified date' with your Todays Date property:

``````if(month([properties.hs_lastmodifieddate])=1, "January",
if(month([properties.hs_lastmodifieddate])=2, "February",
if(month([properties.hs_lastmodifieddate])=3, "March",
if(month([properties.hs_lastmodifieddate])=4, "April",
if(month([properties.hs_lastmodifieddate])=5, "May",
if(month([properties.hs_lastmodifieddate])=6, "June",
if(month([properties.hs_lastmodifieddate])=7, "July",
if(month([properties.hs_lastmodifieddate])=8, "August",
if(month([properties.hs_lastmodifieddate])=9, "September",
if(month([properties.hs_lastmodifieddate])=10, "October",
if(month([properties.hs_lastmodifieddate])=11, "November",
if(month([properties.hs_lastmodifieddate])=12, "December", "Unknown"
))))))))))))``````

The formula builder is very particular, including case-type for the functions. Posting a screenshot in case it's needed for troubleshooting. That said, please reach out with any questions.

All the Best,

Ryan Schweighart

Whole Hart Impact, LLC

whimpact.co

I help businesses with HubSpot and Zapier.

Hall of Famer | Partner

Name of Month via Calculated Property Help

SOLVE

Nice one, @RSchweighart!

 Karsten KöhlerHubSpot Freelancer | RevOps & CRM Consultant | Community Hall of FamerBeratungstermin mit Karsten vereinbaren

 Did my post help answer your query? Help the community by marking it as a solution.
Top Contributor

Name of Month via Calculated Property Help

SOLVE

Great stuff, thank you. Yep, formulas are very touchy, so I appreciate you clearing this up for me. This method is efficient unless you find that using 1/200 of calculated properties isn't worth it.

Participant

Name of Month via Calculated Property Help

SOLVE

@spogue  The only thing I can think of is to create a another property and build a workflow with 12 distinct branches.

Example: new proeprty can be called "Today's Date (Alphabetical)" that is a dropdown of all 12 months. Then build a workflow that is trigger if "Today's Date" is known. Then use if/when branches with the first branch being" if Today's Date" is between 1/1 and 1/31 then set property entitled "Today's Date (Alphabetical)" to January....

It's a relatively easy workflow to build and there is no harm in creating another property that is hidden on the backend.

Top Contributor

Name of Month via Calculated Property Help

SOLVE

Thanks for the feedback Josh!