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

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     <SOLVED>Determing Day of week at beginning of report
Go
New
Search
Notify
Tools
Reply
  
<SOLVED>Determing Day of week at beginning of report
 Login/Join
 
Gold member
posted
At the very beginning for a report I capture the Current Date using the code:
-SET &SDATE=&MDYY;

What I am trying to figure out is how to determine the day of the week from the current date and assign that value to a variable (numeric format).

This message has been edited. Last edited by: Jeff_Rowland,


7.7.02 Windows7
HTML/Excel/PDF
 
Posts: 66 | Registered: April 16, 2008Reply With QuoteReport This Post
Guru
posted Hide Post
Hint: Look up the DOWK function and the DECODE function. Post your solution.


WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files
 
Posts: 320 | Location: Memphis, TN | Registered: February 12, 2008Reply With QuoteReport This Post
Platinum Member
posted Hide Post
I needed that a few weeks ago, came up with this:
 -SET &DOW = IMOD(YMD(18991231,&YYMD),7,'I5'); 


WebFOCUS 8.2.06
 
Posts: 195 | Location: Sterling Heights, Michigan | Registered: October 19, 2010Reply With QuoteReport This Post
Gold member
posted Hide Post
Thanks. It works for me


7.7.02 Windows7
HTML/Excel/PDF
 
Posts: 66 | Registered: April 16, 2008Reply With QuoteReport This Post
Guru
posted Hide Post
  
-SET &Day = DOWK(&YYMD,'A3');
-SET &DayNumber = DECODE &Day ('SUN' 1 'MON' 2 'TUE' 3 'WED' 4 'THU' 5 'FRI' 6 'SAT' 7);

-TYPE Day = &Day
-TYPE DayNumber = &DayNumber


WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files
 
Posts: 320 | Location: Memphis, TN | Registered: February 12, 2008Reply With QuoteReport This Post
Expert
posted Hide Post
Another 'hidden' date variable:

&DATEW

Value today: 4, which is Thursday.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Reply With QuoteReport This Post
Gold member
posted Hide Post
quote:
&DATEW

Mighty Max, dbeagan, Francis thank you for your all your input. Just what I needed.

Question: Is there any documention available that list"Undocumented/hidden" variables? - Just Curious.


7.7.02 Windows7
HTML/Excel/PDF
 
Posts: 66 | Registered: April 16, 2008Reply With QuoteReport This Post
Virtuoso
posted Hide Post
The Wizard of Waz has provided a pretty complete list: List of &DATE system variables


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Reply With QuoteReport This Post
Expert
posted Hide Post
Wow! Great job Waz.

By the way, could someone confirm that the oft-mentioned Book Of Dates has these mentioned?

Cheers,


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     <SOLVED>Determing Day of week at beginning of report

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