which are obviously NOT what I want. The challenge for me is that the DATEADD function and the DAYMD function do not work for us with our current adapter version. Anyone have any suggestions? I am spinning my wheels at the moment.This message has been edited. Last edited by: Kerry,
WebFOCUS Dev Studio 7.6.11 Windows, all output
December 29, 2010, 04:02 PM
Waz
As you have discovered, adding and subtracting number from a date in dialog manager only takes the date as a number.
Check out the AYMD function in the documentation, under Legacy Date Functions.
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
December 29, 2010, 04:07 PM
WendyC
Solved - that did it. I just couldn't come up with that. Must have looked at it too long this morning. Thanks, all
WebFOCUS Dev Studio 7.6.11 Windows, all output
January 17, 2011, 05:46 PM
nsk110483
How to take care of the case where year is a leap year?
Please Help
In Focus since 2008 WebFOCUS 8.2.0.1 Windows 7 - IE,Chrome,Firefox Excel, PDF, HTML, AHTML, XML JavaScript, jQuery, D3.js, Highcharts
February 08, 2011, 08:53 AM
atturhari
How to find if a year is a leap year or not?
IS ther any WF function?
-Hari WF-769
WF 7.7.02 on Windows 7 Teradata HTML,PDF,EXCEL,AHTML
February 08, 2011, 11:49 AM
Tony A
Not specifically, but you can always grow your own if you just think about it a while -
DEFINE FUNCTION IS_LEAP(YEAR/I4)
IS_LEAP/A1 = IF EDIT(YEAR,'$$99') EQ '00' AND (INT(YEAR / 400) * 400 NE YEAR) THEN 'N'
ELSE IF (INT(YEAR / 4) * 4 EQ YEAR) THEN 'Y' ELSE 'N';
END
-RUN
-REPEAT :Loop FOR &Year FROM 1900 TO 2012;
-SET &LeapYear = IS_LEAP(&Year);
-TYPE &Year &LeapYear
-:Loop
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
February 08, 2011, 07:15 PM
Doug
Nice Function Tony.
Full DM Solution:
-SET &YearToCheck = 2012 ;
-SET &IsItALeapyear = IF (INT(&YearToCheck / 4) * 4 EQ &YearToCheck) THEN 'Leap Year' ELSE 'Regular Year' ;
-TYPE *** &YearToCheck is a &IsItALeapyear ***
-SET &YearToCheck as desired.
February 09, 2011, 09:22 AM
atturhari
Thanks a lot Tony and Doug. The code is simple and great.
WF 7.7.02 on Windows 7 Teradata HTML,PDF,EXCEL,AHTML