Hello,
I want to create a weekday based on the create day. Can this be done by a workflow or any other solution?
Thanks, Magnus
Hello,
I want to create a weekday based on the create day. Can this be done by a workflow or any other solution?
Thanks, Magnus
Hi @MSchmidt_Klimeo,
Without Operations Hub Professional, this is not possible natively. With Operations Hub Professional, this can be achieved with a simple custom code action: Workflows | Custom Code Actions - HubSpot docs
If you have this license, let me know, happy to share the code. I’ve worked on something very similar before.
Best regards!
Hi, “Only” Sales & Marketing Hub Enterprise
Hi @MSchmidt_Klimeo, in that case you would have to try to solve this through a third-party solution like Zapier. Natively, it’s not possible.
Hi @karstenkoehler could you share this code with me you mentioned in this thread? I just got operations hub and want to have a workflow that will give me day of the week.
I am looking to do this same thing but in operations hub. Could you share the code?
(I am actually trying to formate a date to be plus 7 weedays from date provided, but they only have days, not weekdays available. So thought I could branch based on day of the week and then set separate formater steps. If you know of a better solution, I’d love to hear it!)
Thanks!
Do you have operations Hub Pro? If so this is quite possible.
Here’s a blog post that we wrote about how to create a day of the week property and then assign leads based upon that day of the week. How to Assign Contacts by the Day of the Week in HubSpot
It’s not quite your use case but you’ll get where I’m coming from conceptually. If you want some help implementing the specifically for you shoot me an email ben@noboundsdigital.com or schedule a quick call https://www.noboundsdigital.com/meetings/bendonahower/15-minutes and we can work out a quick project.
You can get the week number using a calculated field from unix time. If needed, add timezone and daylight saving adjustments. You can also use an IF statement to replace 1 = Monday, and so on.
Example:
“((round_down([properties.createdate]/86400000,0)+4)/7-round_down((round_down([properties.createdate]/86400000,0)+4)/7,0))*7”
Hi @Antonko
Thank you for contributing to our community! We appreciate your post and have kept it live, but adding a bit more detail would make it even more helpful to others.
It would be great to see step-by-step instructions on implementing this solution.
Thanks, Victor
Thanks so much for this! I changed it to a string property and was able to have the output be the day of the week. Also I did have to change to +3 to be accurate.
if((((round_down(([properties.createdate] / 86400000), 0) + 3) - (7 * round_down(((round_down(([properties.createdate] / 86400000), 0) + 3) / 7), 0))) == 0), “Monday”, if((((round_down(([properties.createdate] / 86400000), 0) + 3) - (7 * round_down(((round_down(([properties.createdate] / 86400000), 0) + 3) / 7), 0))) == 1), “Tuesday”, if((((round_down(([properties.createdate] / 86400000), 0) + 3) - (7 * round_down(((round_down(([properties.createdate] / 86400000), 0) + 3) / 7), 0))) == 2), “Wednesday”, if((((round_down(([properties.createdate] / 86400000), 0) + 3) - (7 * round_down(((round_down(([properties.createdate] / 86400000), 0) + 3) / 7), 0))) == 3), “Thursday”, if((((round_down(([properties.createdate] / 86400000), 0) + 3) - (7 * round_down(((round_down(([properties.createdate] / 86400000), 0) + 3) / 7), 0))) == 4), “Friday”, if((((round_down(([properties.createdate] / 86400000), 0) + 3) - (7 * round_down(((round_down(([properties.createdate] / 86400000), 0) + 3) / 7), 0))) == 5), “Saturday”, “Sunday”))))))
For context for others: this is using a custom calculations property, not the operations hub or a workflow
Chatgpt was used to refine this calculation
This is fantastic, thank you so much for sharing - a brilliant way to solve an irritating problem!
Do you have Data Hub (formerly Operations Hub) Pro? If so, this can be done. It’s pretty quick, so if you need no frills day of the week, it would be < $1000. Email me with the details for a quote, ben@noboundsdigital.com. You could also give ChatGPT / Claude Code a shot. There is a sporting chance that it would spit out the code.