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     date translation on &variable

Read-Only Read-Only Topic
Go
Search
Notify
Tools
date translation on &variable
 Login/Join
 
Silver Member
posted
I have an &variable (global) coming from a web page to the focexec. I want to use the &variable in the heading of my report. It's format from the web page is mm/dd/yy. I want to see the month spelled out, then the day, then the 4 digit year. Ex. January 1, 2005.

I know there is "tr", which is used something like this "MtrDYY", to make the Month spelled out. However, I can't seem to get it to work on an &variable. I put it in a define as such: ESDATE/MtrDYY=&&P_SDATE;. This gives me no error, but no output either.

Anyone have any ideas? Thanks for your help.
 
Posts: 31 | Location: Oklahoma City, OK | Registered: September 11, 2003Report This Post
Expert
posted Hide Post
-SET &ECHO=ALL;

SET DEFCENT = 20
-RUN

-SET &DT1 = '12/31/04';

-SET &DT1A = EDIT(&DT1,'99$99$99');
-SET &DT2 = LCWORD(17,CHGDAT('MDY', 'MXDYY', &DT1A, 'A17'), 'A17') ;
-TYPE &DT1 &DT2

SET DEFCENT is to set the default century, which on my PC was defaulted to 19.

EDIT edits out the slashes.
CHGDAT changes the date format.
LCWORD creates a lower case Month name with the first character in Uppercase.
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Gold member
posted Hide Post
Francis is, of course, correct. The other way is to use your idea of the DEFINE, combined with Francis' EDIT to get rid of the slashes:

SET DEFCENT=19,YRT=50

-RUN

-SET &P_SDATE=EDIT(&&P_SDATE,'99$99$99');

DEFINE FILE fn

ESDATE/MtrDYY='&P_SDATE';
END
 
Posts: 60 | Location: 2 penn | Registered: May 22, 2003Report This Post
Silver Member
posted Hide Post
Thanks for the response. It's working now.
 
Posts: 31 | Location: Oklahoma City, OK | Registered: September 11, 2003Report This Post
Platinum Member
posted Hide Post
You should consider the book almost 1001 Ways to Work with Dates in WebFOCUS...It will answer your questions on almost every kind of date transformation and date calculation. Comes with CD with all code on it. Check it out.
Regards,
Vivian
Publisher of books:
Focus Keysheet & WebFOCUS Keysheet


Vivian Perlmutter
Aviter, Inc.


WebFOCUS Keysheet Rel. 8.0.2
(Almost) 1001 Ways to Work with Dates thru Rel. 8.0.2
Focus since 1982
WebFOCUS since the beginning
Vivian@aviter.com

 
Posts: 191 | Location: Henderson, Nevada | Registered: April 29, 2003Report 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     date translation on &variable

Copyright © 1996-2020 Information Builders