www.icetips.com  Icetips Utilities Documentation 11/14/2010    

Date Class: GetDate

Previous  Top  Next  


Prototype: (Date pDate, Long pPeriods, Byte pDatePart=1),Long

 

pDateBase date for the calculations.
pPeriodsNumber of period units to add.  This number can be positive or negative
pDatePartIndicates what type of unit to use.  Can be IT_Days, IT_Weeks, IT_Months or IT_Years.  Defaults to IT_Days.

 

ReturnsThe date calculated by adding pPeriods of pDatePart units to the pDate.

 

This method adds - or subtracts - a specified number of period units from the pDate base date.  This method is basically the same as the DateAdd method, but different parameter order. 

 

Example:

ITD  ITDateClass

FD   Date

Code

FD = Date(7,1,2010)

 

ITD.ODS('GetDate = ' & Format(ITD.GetDate(FD, -3, IT_Months),@D18))  !! Apr 1, 2010

ITD.ODS('GetDate = ' & Format(ITD.GetDate(FD,  3, IT_Months),@D18))  !! Oct 1, 2010

ITD.ODS('GetDate = ' & Format(ITD.GetDate(FD,-10, IT_Months),@D18))  !! Sep 1, 2009

 

 

See also:

DateAdd

 



Direct link to this page: http://www.icetips.com/manuals/utilities/getdate_dateclass.htm