GOMONTH() gives us the ability to move forward/backward on a specified number of months before or after a given Date or Date/Time expression:
Create Cursor junk (xdate d)
ldBase = Date(2014,1,1)
For lnloop = 1 To 12
Insert Into junk Values (GOMONTH(m.ldBase,1))
ldBase = xdate
I have been comfortably using GOMONTH() without any thought of its known bug which is that it returns empty dates before 09/14/1752 because I definitely won't need to go way back that far for any date requirements.
However, I expect that when I perform GOMONTH() on end of month dates, that it will return the end of months of the succeeding months as well. A fellow Foxite member Gene Wirchenko mentioned that it does not that if dates fall between 28 to 30 (February 28 & 29 plus months that ends on 30), succeeding dates will show the same day; not the end of month. I tested now and he is right: