Oracle function add_months(X,Y)

One, function introduction

It is used to calculate the time value after or before Y months above the time X (Y is a positive number to indicate after, and Y is a negative number to indicate before)

Two, usage examples

1. The current time two months ago:

select add_months(sysdate,-2) from dual;

2. The current point in time two months later:

select add_months(sysdate,2) from dual;

Guess you like

Origin blog.csdn.net/weixin_42228950/article/details/103644626