# General Caster Formula

I have a formula in Monday.com that is “ROUNDDOWN((DAYS(TODAY(),{Anniversary Date}))/365,0)” which calculates the number of years an employee has worked for my company. Since Monday.com doesn’t allow us to do automation that includes formula, I’d like to use General Caster, but I can’t figure out what the equivalent formula would be in General Caster.

@rachelmele

For very complex calculations on a formula you can do it with integromat.

On a table of calculation of absences between 2 dates.

In the example below, triggered by a webhook, the data is sent to Google Sheet, retrieve the data and send in monday

Hey @rachelmele

That’s a great question! I would recommend reviewing General Caster Documentation for this.

Your result would need to be formatted as a numeric value, if you are casting the result to a Numbers column. I also find it useful to send the output to a Text column at first to troubleshoot things, as this can help fine-tune the value while you are finalizing the formula.

-Alex

Thanks for the reply @AlexSavchuk. Yes, reviewed the General Caster Documentation but could not find any information about how to create this kind of formula. That is why I posted here in hopes that someone in the community might be able to assist me.

Hi @rachelmele,
I think the main problem here is that you need to normalize the date formats. I think TODAY function in GC returns it in different format than the {pulse.date} in monday.com. Here is a sample formula for GC that I made & tested, it seems to be working for me, just remove the pulse date and use your own columnID Good Luck!
ROUNDDOWN(DAYS(DATEVALUE(TEXT(TODAY(),“YYYY-MM-DD”)),DATEVALUE(TEXT({pulse.date},“YYYY-MM-DD”)))/365,0)

Thank you so much for the reply but I’m still not getting it and actually I realized I have another problem. Below is the formula I used based on what you told me. Did I get it right? I tested it by changing the Anniversary Date but it did not calculate. That said, I’m now realizing the Anniversary Date never changes (it’s the date the employee was hired and really I should re label it to say that). Ultimatey what I want is a formula that calculates the number of years an employee has worked for us and for General Caster to make that a text field that I can use in an automation. Any additional help would be greatly appreciated.

@rachelmele Hmm strange it still works for me, I have no idea why it wont calculate for you, maybe try changing format of the target column to text, also there was an update of GC recently, maybe worth trying again today. As for the other problem, technically you could set up another date column (lets say its Date2) and push it yearly on the day the anniversary happens this year/next year(some manual work required). And then use an integration based on that Date 2 column, that way the integration would trigger every time Date2 changes. It might not be the most optimal way (leap years can also be a problem not sure how exactly monday considers “a month”). So it’s not completely dynamic but it will still refresh periodically based on the push days automation.
That’s how it would look like:

Date 1 would be Anniversary in your case

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.