I have an input column date datatype and it contains either 1st day of month or last day of month, i need to develop logic such that last day of month should be increased by one day and it becomes first day of next month and keep first day of months as it is.
Thanx
There are functions available to handle 'Julian' dates. Use them to convert your 'last day of the month' to julian format, add 1 to that date (which will add 1 day) and then convert it back to an external date.
-craig
"You can never have too many knives" -- Logan Nine Fingers
Check the day part with if then else and if its not '01' then convert to ordinal date using JulianDateFrom() function (I think thats what its called) to convert it and do as Craig advised.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
So could many of us. But there was nothing in the original post to suggest Oracle. You may be surprised to learn that not everyone in the world uses Larry's database.
A universally-applicable solution was required, and given.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.