For the I8MDYY value I get 8302017, I'm looking to get 08302017. When I do this I8YYMD, I get 20170830. I must be missing something but can't figure out what it is! Any advice is appreciated!This message has been edited. Last edited by: cldiaz,
WebFOCUS 8204 Windows, All Outputs
September 11, 2017, 08:36 AM
MartinY
quote:
For the I8MDYY value I get 8302017
Format I8 is an Integer, a numeric value. Left side zero (0) are useless in numeric representation. So while the month will be below 10, you won't have it display as 08302017.
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
September 11, 2017, 08:39 AM
BabakNYC
If you need the 0 for display consistency, you can convert the Integer to an Alpha using this code:
-SET &LAST_WEEK_MDYY=IF &LAST_WEEK_MDYY.LENGTH LE 7 THEN '0'||&LAST_WEEK_MDYY ELSE &LAST_WEEK_MDYY;
Thanks all of you! Based on the advice I just changed my format to an A8MDYY instead of I8MDYY and it now works as expected.
WebFOCUS 8204 Windows, All Outputs
September 12, 2017, 08:49 AM
jgelona
cldiaz, here's why that worked. You have to remember that in Dialogue Manager, every variable is an alphanumeric string. However, when you specified a I8MDYY format, and since the variable was all numbers, DM treated it like a integer and trimmed the leading zero. Using A8MDYY left the leading zero. When I see issues on here about DM, a great deal of the time it is because the person asking the question doesn't know or has never been told that all local and global variables are alphanumeric strings.
In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.