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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
Amper Variable Date
 Login/Join
 
Silver Member
posted
I have a report where I am doing a search on the date range. The date is stored in sql server as dd/mm/yyyy. When the report parameter prompts the user for the date they have to put in the date as yyyy/mm/dd. The real problem with this is that I have this variable in the heading and so the heading now says from 2005/07/01 to 2005/07/30. They really want it to say from 07/01/2005 to 07/30/2005. I have changed the format of the field so it shows up in the report as the correct order, but cannot find a way to convert the amper variable to show this way.

Any ideas?
 
Posts: 45 | Registered: March 18, 2005Report This Post
Platinum Member
posted Hide Post
Assuming the two dates entered are &DATE1 and &DATE2, use something like the following:

DEFINE FILE CAR
DT1_YYMD/YYMD = '&DATE1' ;
DT2_YYMD/YYMD = '&DATE2' ;
DT1_MDYY/MDYY = DT1_YYMD ;
DT2_MDYY/MDYY = DT2_YYMD ;
END

TABLE FILE CAR
HEADING
"FROM <DT1_MDYY TO <DT2_MDYY"
...
END

Ken
 
Posts: 177 | Location: Calgary, Alberta, Canada | Registered: April 25, 2005Report This Post
Expert
posted Hide Post
The easiest way to change the positions of date elements in a Dialog Manager variable is to use the EDIT function:

-SET &INDATE = '2005/07/31';
-SET &INDATE1 =
- EDIT(&INDATE,'$$$$$99$$$') | '/' |
- EDIT(&INDATE,'$$$$$$$$99') | '/' |
- EDIT(&INDATE,'9999$$$$$$');
-TYPE &INDATE - &INDATE1

There's all kinds of date functions you could use, but this is the easiest method.
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Guru
posted Hide Post
Here is another way:
-SET &DT_YYMD = '2005/07/21';
-SET &DT = EDIT(&DT_YYMD,'9999$99$99');
-SET &DT = CHGDAT(YYMD,MDYY,&DT,'A8');
-SET &DT_MDYY = EDIT(&DT,'99/99/9999');
-TYPE DT_YYMD: &DT_YYMD
TYPE DT_MDYY: &DT_MDYY

This message has been edited. Last edited by: <Mabel>,
 
Posts: 406 | Location: Canada | Registered: May 31, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders