|
Previous Top Next |
Prototype: | (Date pDate, *ANY pFromDate, *ANY pToDate),LONG,PROC |
pDate | Base date to calculate from. |
pFromDate | Start date of the period. |
pToDate | End date of the period. |
Returns | Number of days in the period |
This method returns the first and last date in the last/previous quarter based on the pDate base date. If the current quarter is the first quarter, this method will return the dates for October 1 and December 31, the year before.
Example:
ITD ITDateClass
FD Date
TD Date
D Date
Ds Long
Code
D = Today()
Ds = ITD.GetLastQuarter(D,FD,TD)
ITD.ODS('GetLastQuarter Date: ' & Format(D,@d18) & ', From: ' & Format(Format(FD,@d18),@s30) & 'To: ' & Format(Format(TD,@d18),@s30) & 'Days: ' & Ds)
See also: