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
DATE in QUOTE
 Login/Join
 
Platinum Member
posted
I have a Date that I want to be put in quotes through the use of a Define.

Generally this is what I have:
DEFINE FILE HOLDMAIN
CTR/I9 = LAST CTR + 1;
CONDITIONAL/A5 = IF CTR EQ 1 THEN '' ELSE 'OR';
STATUS/A8 = EVENT_STATUS;
DATE/HYYMDS = EVENT_EFF_DATE;
CODE/A8 = EVENT_CODE;
END

BUT when I put them in single quotes I use this:

DEFINE FILE HOLDMAIN
CTR/I9 = LAST CTR + 1;
CONDITIONAL/A5 = IF CTR EQ 1 THEN '' ELSE 'OR';
STATUS/A8 = '''' || EVENT_STATUS || '''';
DATE/HYYMDS = '''' || EVENT_EFF_DATE || '''';
CODE/A8 = '''' || EVENT_CODE || '''';
END

Everything works fine EXCEPT the Date. All I want to do is display it in single quotes.

TABLE FILE HOLDMAIN
PRINT
CONDITIONAL
DATE
END

Which would look like this:

CONDITIONAL DATE
(BLANK) '01/01/2005'
OR '01/02/2005'


Does this make sense?

Thanks for your help!
 
Posts: 178 | Registered: May 11, 2005Report This Post
Expert
posted Hide Post
Try this. You have to convert the HYYMDS date to alpha to append anything to it:

DEFINE FILE CAR
DATE1/HYYMDS = HINPUT(8, '20050523', 8, 'HYYMDS');
DATE2/A22 = '''' || HCNVRT(DATE1,'(HYYMDS)',20,'A20') || '''';
END
TABLE FILE CAR
PRINT
CAR
DATE1
DATE2
BY COUNTRY
END
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
That worked!! Thanks so much... the only one I used was the HCNVRT, but I had never seen that function so would never have thought of it.

Thanks a million again.
 
Posts: 178 | Registered: May 11, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders