Multiple choice technology databases

What does the function months_between('02-feb-2001','01-jan-2001') return?

  1. 8

  2. 30

  3. 1.03225806

  4. .998989989

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

MONTHS_BETWEEN returns the number of months between two dates as a decimal. From Jan 1 to Feb 2, 2001 is 32 days. Dividing by average days in month (30.44) or exact calculation: Feb 2 is day 33, Jan 1 is day 1, so 32 days difference = 32/31 ≈ 1.032. The exact result is approximately 1.032 months.