Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Go
New
Search
Notify
Tools
Reply
  
SDATEY question
 Login/Join
 
Gold member
posted
Using SDATEY in my heading to display the current year. Need to subtract two years from SDATEY so I can get 2004 in my heading. Hate to ask such a dumb question but how do you do that? Haven't been able to find it in the help.
 
Posts: 72 | Registered: April 03, 2006Reply With QuoteReport This Post
Virtuoso
posted Hide Post
DEFINE FILE WHATERVER
NEWYEAR/YY = SDATEY - 2;
END


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Reply With QuoteReport This Post
Gold member
posted Hide Post
how is it used?
Heading
"Submissions 1/1/ NEWYEAR Through &SDATEM &SDATEY"
 
Posts: 72 | Registered: April 03, 2006Reply With QuoteReport This Post
Gold member
posted Hide Post
USED THE ABOVE SYNTEX AND GOT
quote:
YY = SDATEY - 2;

FIELDNAME OR COMPUTATIONAL ELEMENT NOT RECOGNIZED: SDATEY
 
Posts: 72 | Registered: April 03, 2006Reply With QuoteReport This Post
Gold member
posted Hide Post
DEFINE FILE CAR
NEWYEAR/YY = SDATEY - 2;
END

TABLE FILE CAR
PRINT MODEL NEWYEAR
END
-RUN

No good.

0 ERROR AT OR NEAR LINE 3 IN PROCEDURE ADHOCRQ FOCEXEC *
(FOC258) FIELDNAME OR COMPUTATIONAL ELEMENT NOT RECOGNIZED: SDATEY
0 ERROR AT OR NEAR LINE 7 IN PROCEDURE ADHOCRQ FOCEXEC *
(FOC003) THE FIELDNAME IS NOT RECOGNIZED: NEWYEAR
BYPASSING TO END OF COMMAND
(FOC009) INCOMPLETE REQUEST STATEMENT
 
Posts: 72 | Registered: April 03, 2006Reply With QuoteReport This Post
Master
posted Hide Post
try this,

DEFINE FILE GGSALES
DT/YY=DATE;
DT1/YY=DT - 2;
END

TABLE FILE GGSALES
PRINT DATE DT DT1
WHERE RECORDLIMIT EQ 5
END
-EXIT


WFConsultant

WF 8105M on Win7/Tomcat
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Reply With QuoteReport This Post
Platinum Member
posted Hide Post
try this.

-SET &CY = EDIT(&DATEYYMD,'9999$$$$');
-SET &PY = &CY - 2;


WF 8 version 8.2.04. Windows.
In focus since 1990.
 
Posts: 189 | Location: pgh pa | Registered: October 06, 2004Reply With QuoteReport This Post
Virtuoso
posted Hide Post
I thought your Date was already just a year...their examples should help.


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Reply With QuoteReport This Post
Gold member
posted Hide Post
Works great.
 
Posts: 72 | Registered: April 03, 2006Reply With QuoteReport This Post
Gold member
posted Hide Post
How can I get the current date 5/12/06 ?
 
Posts: 72 | Registered: April 03, 2006Reply With QuoteReport This Post
Virtuoso
posted Hide Post
TODAY/MDYY = '&DATEMDYY';


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Reply With QuoteReport This Post
Gold member
posted Hide Post
&DATE works great in the heading
 
Posts: 72 | Registered: April 03, 2006Reply With QuoteReport This Post
Platinum Member
posted Hide Post
FYI - You should check out the book (almost) 1001 Ways to Work with Dates in WebFOCUS at www.aviter.com. Gives numerous examples of working with dates including legacy, time stamp dates, and all kinds of conversions. Also includes calculating aging examples and time zone changes. Has a CD with all examples that can be used in your code.


Vivian Perlmutter
Aviter, Inc.


WebFOCUS Keysheet Rel. 8.0.2
(Almost) 1001 Ways to Work with Dates thru Rel. 8.0.2
Focus since 1982
WebFOCUS since the beginning
Vivian@aviter.com

 
Posts: 191 | Location: Henderson, Nevada | Registered: April 29, 2003Reply With QuoteReport This Post
  Powered by Social Strata  
 


Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.