MONTHS BETWEEN UDF [DEPRECATED]
This UDF has been deprecated. Current transformation for Oracle MONTHS_BETWEEN() is Snowflake MONTHS_BETWEEN().
Description
MONTHS_BETWEEN
returns number of months between datesdate1
anddate2
. (Oracle MONTHS_BETWEEN SQL Language Reference)
Oracle MONTHS_BETWEEN
and Snowflake MONTHS_BETWEEN
function, have some functional differences, to minimize these differences and replicate Oracle MONTHS_BETWEEN
function better, we added a custom UDF.
Custom UDF overloads
MONTHS_BETWEEN_UDF(timestamp_ltz, timestamp_ltz)
Parameters
FIRST_DATE: The first
TIMESTAMP_LTZ
of the operation.SECOND_DATE: The second
TIMESTAMP_LTZ
of the operation.
Oracle
IN -> Oracle_01.sql
Snowflake
OUT -> Oracle_01.sql
Known Issues
1. Precision may differ from Oracle
Some results may differ in the number of decimal digits.
Related EWIs
No related EWIs.
Last updated