Focal Point
<SOLVED>Determing Day of week at beginning of report
August 01, 2012, 10:21 AM
Jeff_Rowland <SOLVED>Determing Day of week at beginning of report
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 , August 02, 2012 10:22 AM 7.7.02 Windows7 HTML/Excel/PDF
August 01, 2012, 10:29 AM
Mighty Max 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
August 02, 2012, 09:58 AM
dbeagan I needed that a few weeks ago, came up with this:
-SET &DOW = IMOD(YMD(18991231,&YYMD),7,'I5'); WebFOCUS 8.2.06
August 02, 2012, 10:21 AM
Jeff_Rowland Thanks. It works for me
7.7.02 Windows7 HTML/Excel/PDF
August 02, 2012, 11:23 AM
Mighty Max
-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
August 02, 2012, 11:45 AM
Francis Mariani 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
August 02, 2012, 12:51 PM
Jeff_Rowland 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
August 02, 2012, 01:07 PM
Dan Satchell The Wizard of Waz has provided a pretty complete list:
List of &DATE system variables WebFOCUS 7.7.05
August 02, 2012, 01:19 PM
Francis Mariani 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