Hi everyone,
I'm trying to create a workflow in Alteryx that calculates the time between two dates using the same methodology as the MONTHS_BETWEEN function in Oracle SQL (see for example: MONTHS_BETWEEN (oracle.com)).
I'm wondering if there is a built-in function in Alteryx that can do this, or if I need to use a combination of other functions.
Any help or suggestions would be greatly appreciated!
Thanks in advance.
Since Oracle's Months_Between function returns fractional months, you'll need to use a combination of functions to duplicate its functionality
The first function returns the number of whole months between the two dates. The second one calculates the fractional part by bringing the start date into the same month as the end date, determining the number of days between them and dividing this by 31, since the Oracle function assumes 31-day months. These functions could combined into a single expression, but leaving them separate makes it somewhat easier to see what's happening
Dan