Im no oracle expert, but tell us what add_months() does andn we can answer the question. Also, tell us what where you want to use this function so that we can suggest the best answer.
dnzl
"what the thinker thinks, the prover proves" - Robert Anton Wilson
I don't believe so, but someone posted a function on this forum before which will do the trick as ADD_MONTHS, see below
FUNCTION AddMonthsToDate(BaseDate, Months)
Equate RoutineName To "AddMonthsToDate"
Ans = @NULL
Test = Iconv(BaseDate, "DYMD")
If Status() = 0 And BaseDate Matches "8N" Then
If Months Matches "1N0N" : @VM : "'+'1N0N"
Then
Year = BaseDate[1,4]
Month = BaseDate[5,2]
Day = BaseDate[7,2]
Month += 6
If Month > 12
Then
Month -= 12
Year += 1
End
Ans = Fmt(Year,"R%4") : Fmt(Month("R%2") : Day
End
Else
Call DSTransformError("Non-integer months in Arg2.", RoutineName)
End
End
Else
Call DSTransformError("Invalid date " : Quote(BaseDate), RoutineName)
End
RETURN(Ans)
denzilsyb, what I mean is add/minus n months to a given date, it's exactly what the oracle add_months() function does.
jclin777, thanks for your post, I know I can created a routine to handle it. I was just wondering if there is a simple built-in funciton I haven't discover to do it. However, it seems the answer is nagative.