i have a column with position start dates. i need to add a formula that calculates colleagues that were this the company for more than a year and flag them in the new column as tenured. is there an easy way of doing this?
Hi @Mkhomiak
Any chance you can provide some sample data so anyone who wants to assist will have a better idea of the data you are working with and expected result? Just make up your own sample data. The request seems simple enough but an example may reduce any miss-understandings down the line. 😀
@Mkhomiak you could use a logic like this:
IF DateTimeDiff(datetimetoday(),[Start Date],"months") > 12 THEN "tenured" else "not tenured" endif
Basically, if the amount of months between today and the starting date is more than 12, flag them with tenured. You can the adjust the logic for your case.
Hi @Mkhomiak
Step 1: Input your dataset.
Step 2: The column which you have imported with date should be in ISO format (YYYY-MM-DD).
Else you need to convert the date from other formats like DD-MM-YYYY or MM-DD-YYYY to ISO format using the Date Time Tool.
Step 3: Using formula tool with the function datetimediff
IF DateTimeDiff(datetimetoday(),[ISO date],"years")>=1
THEN "Tenured"
ELSE Null()
ENDIF
In the above formula, as datetimetoday() is used the workflow takes today's date dynamically to calculate the tenure.
If you need to check for specific date, replace it with date in ISO format.
IF DateTimeDiff("2023-01-01",[ISO date],"years")>=1
THEN "Tenured"
ELSE Null()
ENDIF
Note: Step 2 can be eliminated if your date is already in ISO format.
Many thanks
Shanker V