This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
As @DavidP mentions, the first formula should bring home the task. However, if you've already tried and worked it out and it still doesn't give the solution, make sure the data type of the fields are correct before the formula tool and the data type you've selected for the output is correct in the Formula Tool.
If it still doesn't work, would you mind posting your workflow and a sample data set for review.