标题:
【NthDayofMonth】
[打印本页]
作者:
龙听
时间:
2022-11-2 11:17
标题:
【NthDayofMonth】
Inputs: StrtDate(Numeric), Nth(Numeric), TargtDay(Numeric);
condition1 = DayOfWeek(JulianToDate(StrtDate)) <= TargtDay ;
If condition1 Then Begin
NthDayofMonth = StrtDate + ((Nth - 1) * 7) + (TargtDay - DayOfWeek(JulianToDate(StrtDate)));
End
Else Begin
NthDayofMonth = StrtDate + ((Nth) * 7) - (DayOfWeek(JulianToDate(StrtDate)) - TargtDay );
End;
复制代码
欢迎光临 龙听期货论坛 (http://www.qhlt.cn/)
Powered by Discuz! 7.2