Stephen the Cook wrote:
dDate = dDate +1
dDate = dDate.AddDays(1);
A simple function:
FUNCTION AddDays(tdDate as Date, tiNumDays as Integer) as Date
* parameter checking goes here of course (but omitted for this email
example)
return tdDate + tiNumDays
ENDFUNC
So it is more verbose, in that you have to define what your adding to the
object.
But you do get more out of it.
dDate = dDate.AddMonths(2);
dDate = dDate.AddYears(1);
and likewise:
FUNCTION AddMonths(tdDate as Date, tiNumMonths as Integer) as Date
* parameter checking goes here of course (but omitted for this email
example)
return GOMONTHS(tdDate,tiNumMonths)
ENDFUNC
FUNCTION AddYears(tdDate as Date, tiNumYears as Integer) as Date
* parameter checking goes here of course (but omitted for this email
example)
return GOMONTHS(tdDate,tiNumYears*12)
ENDFUNC
.....a couple more lines, but no big deal!
--
Michael J. Babcock, MCP
MB Software Solutions, LLC
http://mbsoftwaresolutions.com
http://fabmate.com
"Work smarter, not harder, with MBSS custom software solutions!"
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.