Unanswered: last_month_date or something similar in Sybase
I was wondering if anybody knew something in sybase or some code that gave me the last month end date from a table. I kno oracle has last_day function i believe.
I also wanted to kno if there was a way of doing something to get a query back between 2 dates. Lets say i did getdate()-1 and getdate()-3.
and getdate was dec... i would get sept oct and nov data.
But it should work also no matter what month. lets say i did this select next year feb ... i should get jan04 dec03 nov03
I have tried a few i keep getting data that isnt right ... hope somebody can help with something
thank for the reply. i will try that solution but i think that solution gives u the number of days in a month. my problem is getting the previous month's end date. so if i ran a query this month i would calculate the novembers last day which is 30th.
Originally posted by willy_and_the_ci
Someone asked same just a few days back.