January 18, 2008, 09:54 AM
jgelonaBut does it say anything about adjusting the input/source date, the date that is being adjusted, to the next business day? The reason I ask is that is appears to do this only when adding days. Consider the following:
-SET &RUNDT1=DATECVT(DATEADD(DATECVT(20080101,'I8YYMD','YYMD'),'BD',-2),'YYMD','I8YYMD');
-SET &RUNDT2=DATECVT(DATEADD(DATECVT(20080101,'I8YYMD','YYMD'),'BD',2),'YYMD','I8YYMD');
-TYPE &RUNDT1 &RUNDT2
Gives 20071228 for &RUNDT1 and 20080104 for &RUNDT2.
Since Jan 1 2008 is a holiday and not a business day, it seems to me, that to be consistent, when I substract 2 business days, the source date (20080101) should be adjusted to 20071231, then substract the 2 days to give 20071227 not 20071228.
January 18, 2008, 10:29 AM
PrarieNot specifically that I've seen...this is a 340 page book full of examples and tips...it's kinda hard to find all notations....Perhaps someone out there has read the entire book.