1

For my requirement, based on input date, two values are calculated in vb.net code.

  1. DateAdd(DateInterval.Day, -1, inputdate.Value.AddDays((inputdate.Value.Day - 1) * -1).AddMonths(1))
  2. inputdate.Value.AddDays((inputdate.Value.Day - 1) * -1).AddMonths(1)

I want to implement above same logic in Sybase ASE procedure. Could anyone help me on this. I need to have these 2 as functions , based on input date ,these two dates has to be calculated

antosnowin
  • 221
  • 2
  • 6
  • 13
  • 2
    Your code appears to be getting the last day of the current month and the first day of the next month. If so, these SQL Server questions can probably be adapted to Sybase with little or no change: [here](http://stackoverflow.com/questions/1051488/get-the-last-day-of-the-month-in-sql) and [here](http://stackoverflow.com/questions/1520789/how-can-i-select-the-first-day-of-a-month-in-sql). – Pondlife May 24 '13 at 19:38
  • do you need them now as function or as procedure ? – dom May 27 '13 at 10:13
  • I have to implement this in procedure. – antosnowin May 27 '13 at 12:21

0 Answers0