Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at myibi@ibi.com and provide your corporate email address, company, and name.


Connect to myibi
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] DATEADD suddenly stopped working

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] DATEADD suddenly stopped working
 Login/Join
 
Platinum Member
posted
Hi All,

Can anyone tell me why the following code suddenly doesn't provide the correct date? This just started to fail two days ago but prior to that it's been working for months.

SET BUSDAYS = _MTWTF_
-RUN
-SET &DTPREV = DATECVT(DATEADD(DATECVT(&YYMD,'I8YYMD','YYMD'),'BD',-1),'YYMD','I8YYMD');
-TYPE &DTPREV

&DTPREV should be 20140916 and instead it's 19001231. WTH!!!

Any ideas or alternatives? This is from WebFOCUS 7.6.9.

Thanks,

Norb

This message has been edited. Last edited by: Norb Eckert,


prod:7.6.9, win2k3 mre, caster, bid, devstudio 7.6.9
 
Posts: 242 | Location: Minneapolis | Registered: February 16, 2006Report This Post
Platinum Member
posted Hide Post
Well I added a line for the holiday file and now it's working correctly.

SET HDAY = SBLC

So I guess that everywhere I have a BUSDAYS command I will need to add an HDAY command as well. I don't understand why this is necessary since I would expect the DATEADD function to work with or without the holiday file being specified.

Thanks,

Norb


prod:7.6.9, win2k3 mre, caster, bid, devstudio 7.6.9
 
Posts: 242 | Location: Minneapolis | Registered: February 16, 2006Report This Post
Master
posted Hide Post
Just put the SET HDAY in the server profile. Also, I think that to use 'BD' the holiday file is required.

"...When using the business day unit, DATEADD uses the BUSDAYS parameter setting and holiday file ..."


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006Report This Post
Gold member
posted Hide Post
maybe a custom holiday file ran out? Might be located here:
ibi/srv769/wfs/bin/hday??.err


8.2.03 AIX Client Windows Tomcat
DB2, Terradata, SQL, Oracle
 
Posts: 56 | Location: Fort Worth, Texas USA | Registered: January 27, 2012Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] DATEADD suddenly stopped working

Copyright © 1996-2020 Information Builders