Reputation: 61
Using Oracle SQL, how can I transform a set of dates to the date for the end of that month? Example below:
Date Amount
18/05/18 10
24/05/18 40
30/05/18 60
Date Amount
31/05/18 110
Thanks
Upvotes: 1
Views: 94
Reputation: 60462
Simply apply last_day
(if there's a time part you must apply trunc
to remove it):
TRUNC(LAST_DAY(datecol))
Upvotes: 8