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     [Solved] Full Date Conversion

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[Solved] Full Date Conversion
 Login/Join
 
Platinum Member
posted
Is there a way to take a date like:

May 25, 2018

and convert it to YYMD or MDYY in WF8105 dialogue manager? I feel like there should be an easy way to do this but for the life of me i can't seem to get the function right.

Thanks for the help!

This message has been edited. Last edited by: Tim P.,


WebFOCUS App Studio 8.2.02
Windows 7, All Outputs
 
Posts: 141 | Location: Mclean, VA | Registered: December 04, 2012Report This Post
Virtuoso
posted Hide Post
You'll have to decompose all the components using character functions first, and then assemble them into the YYMD. This would involve DECODE of the Month into the 2 digit month number. I'd start with SUBSTR and go from there.

How bad do you need this? It's a lot of code.


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Platinum Member
posted Hide Post
yea decomposing the date and the concantenating it back together was about the only way i got close to what i needed.

It's not critical right now as i'm just fiddling around in the new 8203 portal page designer. If your content is driven by a date parameter, the control is predicated on that parameter but the default format in the control is as above and i don't see a way to change it.


WebFOCUS App Studio 8.2.02
Windows 7, All Outputs
 
Posts: 141 | Location: Mclean, VA | Registered: December 04, 2012Report This Post
Gold member
posted Hide Post
FOCUS has supported something called "natural dates" (constants) from forever, but to my knowledge this is not exposed in a user function. The code below will work on most platforms:

-DEFAULTS &INDATE = 'Jan 1, 2018' ;
FI MYFEX DISK myfex.fex (LRECL 80
DEFINE FILE CAR
MYDT/YYMD WITH COUNTRY = '&INDATE' ;
MYA/A8YYMD = MYDT ;
ACMD/A80 = '-SET ' | '&&' | 'WOW=' | '''' | MYA | '''' | ';' ;
END
TABLE FILE CAR
PRINT ACMD
IF RECORDLIMIT EQ 1
ON TABLE SAVE AS MYFEX
END
-RUN
EX MYFEX
-RUN
-TYPE DATE IS &&WOW
-EXIT


Once you have the global variable &&WOW, you can use any of the date functions from dialog mgr to get any date you want.


IBI Development
 
Posts: 61 | Registered: November 15, 2005Report This Post
Platinum Member
posted Hide Post
Yea it looks like using the car file (or any other small temp table) may be the only way. I was kind of hoping for a solution that didn't involve bringing in a table but oh well.
Thanks for the help!


WebFOCUS App Studio 8.2.02
Windows 7, All Outputs
 
Posts: 141 | Location: Mclean, VA | Registered: December 04, 2012Report This Post
Platinum Member
posted Hide Post
This could be a way to go:
 

-DEFAULT &Date1 = 'May 25, 2018';

 DEFINE FUNCTION TODATE(null/I1)
 DTEMDYY/MDYY = '&Date1';
 TODATE/A8MDYY = DTEMDYY;
 END
-RUN

-SET &Date2 = TODATE(.);
-TYPE &Date1 --> &Date2  


WebFOCUS 8.2.06
 
Posts: 210 | Location: Sterling Heights, Michigan | Registered: October 19, 2010Report 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     [Solved] Full Date Conversion

Copyright © 1996-2020 Information Builders