SFDB_DTADJUST

int __stdcall SFDB_DTADJUST(LONG argDate,


WORD argNextPrev,


LPCTSTR holidays,


LPLONG zDates,


size_t nSize,


WORD wkndNo,


LPLONG retVal 

)

Examines whether the given date falls on a weekend or a holiday (i.e. non-working day), and returns the nearest working business day using a Business Day Convention (BDC).

Returns
status code of the operation
Return values
NDK_SUCCESSOperation successful
NDK_FAILEDOperation unsuccessful. See SFMacros.h for more details.
See Also
SFDB_ISWRKDY()
Parameters
[in]argDateis a serial date number that represents a given date
[in]argNextPrevis the Business Day Convention (BDC): 1=Following, 2=Following Modified, 3=Preceding, 4=Preceding Modified, 5=Unadjusted (default
[in]holidaysis a (:_:) separated list of holiday names, calendars, countries or currency
[in]zDatesis an array of holidays dates; each expressed as a serial number (i.e. number of days since 1.1.1970)
[in]nSizeis the number of holiday dates.
[in]wkndNois the weekend number (1-7,11-17). If missing, the western weekend (i.e. 1, "Saturday, Sunday") is used.
[out]retValis the dates of the nearest business day.
Examples:
dbm_rollover.cpp.
NDK_RETCODE DTADJUST(System.DateTime argDate,


UInt16 argNextPrev,


string holidays,


System.DateTime zDates,


UInt16 wkndNo,


ref System.DateTime retVal 

)

Examines whether the given date falls on a weekend or a holiday (i.e. non-working day), and returns the nearest working business day using a Business Day Convention (BDC).

Return Value

a value from NDK_RETCODE enumeration for the status of the call. 

NDK_SUCCESS  operation successful
Error  Error Code
Parameters
[in]argDateis a serial date number that represents a given date
[in]argNextPrevis the Business Day Convention (BDC): 1=Following, 2=Following Modified, 3=Preceding, 4=Preceding Modified, 5=Unadjusted (default
[in]holidaysis a (:_:) separated list of holiday names, calendars, countries or currency
[in]zDatesis an array of holidays dates; each expressed as a serial number (i.e. number of days since 1.1.1970)
[in]wkndNois the weekend number (1-7,11-17). If missing, the western weekend (i.e. 1, "Saturday, Sunday") is used.
[out]retValis the dates of the nearest business day.
Examples
References
* Hamilton, J .D.; Time Series Analysis , Princeton University Press (1994), ISBN 0-691-04289-6
* Tsay, Ruey S.; Analysis of Financial Time Series John Wiley & SONS. (2005), ISBN 0-471-690740
* D. S.G. Pollock; Handbook of Time Series Analysis, Signal Processing, and Dynamics; Academic Press; Har/Cdr edition(Nov 17, 1999), ISBN: 125609906
* Box, Jenkins and Reisel; Time Series Analysis: Forecasting and Control; John Wiley & SONS.; 4th edition(Jun 30, 2008), ISBN: 470272848