Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] dialogue manager date

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] dialogue manager date
 Login/Join
 
Platinum Member
posted
Should be real simple. I'm trying to get current quarter for today's date in dialogue manager. I've tried using the DATECVT function, but I'm probably not doing it right. The idea is to display QYY format for today's date ("Q4 2009"):

 -SET &ASOFDATE = DATECVT(&MDYY, 'I8MDYY', 'MDYY');
-SET &MYDATE = DATECVT(&ASOFDATE, 'MDYY', 'QYY');
-TYPE &MDYY - &ASOFDATE - &MYDATE 

I'd love some help from anyone who knows how to use WF dates.

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


Thanks.

Mark
WF 7.6 Windows
 
Posts: 150 | Registered: July 26, 2007Report This Post
Virtuoso
posted Hide Post
Dialogue Manager is not very good with dates. It handles numbers well and strings well, but is pretty dumb when it comes to dates and requires quite a bit of trickery to get the simplest calculations.

In any case, it does not know what the format of QYY would be as DM can only use string or alpha formats and QYY is a date format. If you converted to A6YYM, this would work. However, DM does not appear to know about quarter translations (or date translations either, for that matter - fails with MTrY)

Your best bet would be to edit the month out of the I8MDYY string and then
IF &MTH EQ '01 OR '02' OR '03 THEN 'Q1'....
and then paste it back with the year.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Virtuoso
posted Hide Post
Your other alternative is to do this in a DEFINE where the date formats are recognized and more easily manipulated.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Silver Member
posted Hide Post
  
DEFINE FILE CAR
FIRST_QTR/MDYY  = '01202009' ;
SECOND_QTR/MDYY = '04202009' ;
THIRD_QTR/MDYY  = '08202009' ;
FOUTH_QTR/MDYY  = &MDYY ;
END
TABLE FILE CAR
PRINT 
FIRST_QTR FIRST_QTR/Q
SECOND_QTR SECOND_QTR/Q
THIRD_QTR THIRD_QTR/Q
FOUTH_QTR FOUTH_QTR/Q
BY COUNTRY NOPRINT
END
 
Posts: 36 | Location: Boston MA | Registered: October 12, 2006Report This Post
Silver Member
posted Hide Post
Quater can be attained from DML too..
  
-SET &ASOFDATE = DATECVT(&MDYY, 'I8MDYY', 'MDYY');
-TYPE &ASOFDATE ;
-SET &MYDATE1 = DATECVT(&ASOFDATE, 'YYMD', 'Q');
-TYPE &MYDATE1 ;
 
Posts: 36 | Location: Boston MA | Registered: October 12, 2006Report This Post
Platinum Member
posted Hide Post
ok, i'm glad i wasn't totally missing something. Thanks for the DEFINE suggestion, I'll give that a shot. Otherwise, I'll just grab it manually.

Thanks all.


Thanks.

Mark
WF 7.6 Windows
 
Posts: 150 | Registered: July 26, 2007Report This Post
Virtuoso
posted Hide Post
Mark,

You could try using a function:
  
DEFINE FUNCTION QFUNC (DT/A8DMYY)
DDT/DMYY=DT;
QDT/Q=DDT;
ADT/A2=IF QDT EQ 'Q1' THEN 'Q1' ELSE 
IF QDT EQ 'Q2' THEN 'Q2' ELSE
IF QDT EQ 'Q3' THEN 'Q3' ELSE
IF QDT EQ 'Q4' THEN 'Q4' ELSE   
'XX' ;
QFUNC/A7=ADT | ' ' | EDIT(DT,'$$$$9999');
END
-RUN
-SET &DT1=&DMYY;
-SET &Q1=QFUNC(&DT1);
-TYPE &DT1 &Q1


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] dialogue manager date

Copyright © 1996-2020 Information Builders